File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,10 @@ BOOST_FIXTURE_TEST_SUITE(fs_tests, BasicTestingSetup)
18
18
BOOST_AUTO_TEST_CASE(fsbridge_pathtostring)
19
19
{
20
20
std::string u8_str = " fs_tests_₿_🏃" ;
21
+ std::u8string str8{u8" fs_tests_₿_🏃" };
21
22
BOOST_CHECK_EQUAL (fs::PathToString (fs::PathFromString (u8_str)), u8_str);
22
23
BOOST_CHECK_EQUAL (fs::u8path (u8_str).u8string (), u8_str);
24
+ BOOST_CHECK_EQUAL (fs::path (str8).u8string (), u8_str);
23
25
BOOST_CHECK_EQUAL (fs::PathFromString (u8_str).u8string (), u8_str);
24
26
BOOST_CHECK_EQUAL (fs::PathToString (fs::u8path (u8_str)), u8_str);
25
27
#ifndef WIN32
@@ -47,7 +49,7 @@ BOOST_AUTO_TEST_CASE(fsbridge_fstream)
47
49
fs::path tmpfolder = m_args.GetDataDirBase ();
48
50
// tmpfile1 should be the same as tmpfile2
49
51
fs::path tmpfile1 = tmpfolder / fs::u8path (" fs_tests_₿_🏃" );
50
- fs::path tmpfile2 = tmpfolder / fs::u8path ( " fs_tests_₿_🏃" );
52
+ fs::path tmpfile2 = tmpfolder / fs::path ( u8 " fs_tests_₿_🏃" );
51
53
{
52
54
std::ofstream file{tmpfile1};
53
55
file << " bitcoin" ;
Original file line number Diff line number Diff line change 1
- // Copyright (c) 2017-2022 The Bitcoin Core developers
1
+ // Copyright (c) 2017-present The Bitcoin Core developers
2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
18
18
#endif
19
19
20
20
#include < cassert>
21
+ #include < cerrno>
21
22
#include < string>
22
23
23
24
namespace fsbridge {
@@ -130,4 +131,4 @@ std::string get_filesystem_error_message(const fs::filesystem_error& e)
130
131
#endif
131
132
}
132
133
133
- } // fsbridge
134
+ } // namespace fsbridge
Original file line number Diff line number Diff line change 1
- // Copyright (c) 2017-2022 The Bitcoin Core developers
1
+ // Copyright (c) 2017-present The Bitcoin Core developers
2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
14
14
#include < ios>
15
15
#include < ostream>
16
16
#include < string>
17
+ #include < system_error>
18
+ #include < type_traits>
17
19
#include < utility>
18
20
19
21
/* * Filesystem operations and types */
You can’t perform that action at this time.
0 commit comments