Fix loop-condition in `iotests.cpp`

This commit is contained in:
Martchus 2023-02-28 21:18:15 +01:00
parent 30819d9e85
commit 169756fce4
1 changed files with 6 additions and 6 deletions

View File

@ -213,12 +213,12 @@ void IoTests::testBinaryWriter()
// test written values
for (char c : testData) {
const auto pos = static_cast<std::size_t>(testFile.tellg());
char expected;
testFile.read(&expected, 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE(argsToString("offset ", pos), asHexNumber(expected), asHexNumber(c));
if (pos >= 58) {
break;
}
char expected;
testFile.read(&expected, 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE(argsToString("offset ", pos), asHexNumber(expected), asHexNumber(c));
}
testFile.seekg(0);
outputStream.seekp(0);
@ -257,12 +257,12 @@ void IoTests::testBinaryWriter()
// test written values
for (char c : testData) {
const auto pos = static_cast<std::size_t>(testFile.tellg());
char expected;
testFile.read(&expected, 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE(argsToString("offset ", pos), asHexNumber(expected), asHexNumber(c));
if (pos >= 58) {
break;
}
char expected;
testFile.read(&expected, 1);
CPPUNIT_ASSERT_EQUAL_MESSAGE(argsToString("offset ", pos), asHexNumber(expected), asHexNumber(c));
}
// test ownership