diff options
Diffstat (limited to 'tests/auto/corelib/io/qfile/tst_qfile.cpp')
-rw-r--r-- | tests/auto/corelib/io/qfile/tst_qfile.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 287b8aebd8..2ef4c2c6a1 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -2618,9 +2618,10 @@ void tst_QFile::appendAndRead() // Write blocks and read them back for (int j = 0; j < 18; ++j) { - writeFile.write(QByteArray(1 << j, '@')); + const int size = 1 << j; + writeFile.write(QByteArray(size, '@')); writeFile.flush(); - QCOMPARE(readFile.read(1 << j).size(), 1 << j); + QCOMPARE(readFile.read(size).size(), size); } readFile.close(); |