summaryrefslogtreecommitdiffstats
path: root/tests/auto/qfile/largefile/tst_largefile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qfile/largefile/tst_largefile.cpp')
-rw-r--r--tests/auto/qfile/largefile/tst_largefile.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/auto/qfile/largefile/tst_largefile.cpp b/tests/auto/qfile/largefile/tst_largefile.cpp
index a9ad017e14..8070ad27df 100644
--- a/tests/auto/qfile/largefile/tst_largefile.cpp
+++ b/tests/auto/qfile/largefile/tst_largefile.cpp
@@ -160,13 +160,10 @@ static inline void appendRaw(QByteArray &array, T data)
*/
static inline void topUpWith(QByteArray &array, QByteArray filler, int size)
{
- Q_ASSERT(filler.size() > 0);
-
for (int i = (size - array.size()) / filler.size(); i > 0; --i)
array.append(filler);
if (array.size() < size) {
- Q_ASSERT(size - array.size() < filler.size());
array.append(filler.left(size - array.size()));
}
}
@@ -206,15 +203,12 @@ static inline QByteArray generateDataBlock(int blockSize, QString text, qint64 u
QByteArray filler("0123456789");
block.append(filler.right(10 - block.size() % 10));
- topUpWith(block, filler, blockSize - 2 * sizeof(qint64));
+ topUpWith(block, filler, blockSize - 3 * sizeof(qint64));
appendRaw(block, counter);
appendRaw(block, userBits);
appendRaw(block, randomBits);
- Q_ASSERT( block.size() >= blockSize );
- block.resize(blockSize);
-
++counter;
return block;
}