Changeset View
Changeset View
Standalone View
Standalone View
src/test/fs_tests.cpp
Show All 10 Lines | |||||
#include <boost/test/unit_test.hpp> | #include <boost/test/unit_test.hpp> | ||||
BOOST_FIXTURE_TEST_SUITE(fs_tests, BasicTestingSetup) | BOOST_FIXTURE_TEST_SUITE(fs_tests, BasicTestingSetup) | ||||
BOOST_AUTO_TEST_CASE(fsbridge_fstream) { | BOOST_AUTO_TEST_CASE(fsbridge_fstream) { | ||||
fs::path tmpfolder = GetDataDir(); | fs::path tmpfolder = GetDataDir(); | ||||
// tmpfile1 should be the same as tmpfile2 | // tmpfile1 should be the same as tmpfile2 | ||||
fs::path tmpfile1 = tmpfolder / "fs_tests_₿_🏃"; | fs::path tmpfile1 = tmpfolder / "fs_tests_₿_🏃"; | ||||
fs::path tmpfile2 = tmpfolder / L"fs_tests_₿_🏃"; | fs::path tmpfile2 = tmpfolder / "fs_tests_₿_🏃"; | ||||
{ | { | ||||
fsbridge::ofstream file(tmpfile1); | fsbridge::ofstream file(tmpfile1); | ||||
file << "bitcoin"; | file << "bitcoin"; | ||||
} | } | ||||
{ | { | ||||
fsbridge::ifstream file(tmpfile2); | fsbridge::ifstream file(tmpfile2); | ||||
std::string input_buffer; | std::string input_buffer; | ||||
file >> input_buffer; | file >> input_buffer; | ||||
Show All 34 Lines |