diff --git a/src/samples/test-sample/test.cpp b/src/samples/test-sample/test.cpp index 707e332c..7c1d5b60 100644 --- a/src/samples/test-sample/test.cpp +++ b/src/samples/test-sample/test.cpp @@ -152,11 +152,6 @@ bool test_io() { const std::filesystem::path filename = "a.txt"; - if (!test_file_path_io(filename)) - { - return false; - } - FILE* fp{}; (void)fopen_s(&fp, filename.string().c_str(), "wb"); @@ -171,6 +166,11 @@ bool test_io() (void)fwrite(text.data(), 1, text.size(), fp); (void)fclose(fp); + if (!test_file_path_io(filename)) + { + return false; + } + std::ifstream t(filename); t.seekg(0, std::ios::end); const size_t size = t.tellg();