Close output stream in IO tests before re-opening

This commit is contained in:
Martchus 2023-06-20 14:02:05 +02:00
parent 9191117120
commit 08a1c5c2eb
1 changed files with 1 additions and 0 deletions

View File

@ -568,6 +568,7 @@ void IoTests::testCopyWithNativeFileStream()
const auto isAborted = [] { return false; };
const auto callback = [&percentage](double p) { percentage = p; };
testFile.seekg(0);
outputStream.close();
outputStream.open(outputPath, ios_base::out | ios_base::trunc | ios_base::binary);
copyHelper.callbackCopy(testFile, outputStream, 50, isAborted, callback);
CPPUNIT_ASSERT_EQUAL(1.0, percentage);