Fix filepath I/O test

This commit is contained in:
momo5502
2025-02-08 19:06:14 +01:00
parent 0bcb18f52b
commit 40bcb097b1

View File

@@ -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();