diff options
Diffstat (limited to 'tests/auto/qfile')
-rw-r--r-- | tests/auto/qfile/largefile/tst_largefile.cpp | 8 | ||||
-rw-r--r-- | tests/auto/qfile/tst_qfile.cpp | 2 |
2 files changed, 3 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; } diff --git a/tests/auto/qfile/tst_qfile.cpp b/tests/auto/qfile/tst_qfile.cpp index 688a92d04b..a0db699c42 100644 --- a/tests/auto/qfile/tst_qfile.cpp +++ b/tests/auto/qfile/tst_qfile.cpp @@ -333,6 +333,8 @@ private: case OpenRFile: return openRFile(file, mode, handleFlags); #endif + case NumberOfFileTypes: + break; } return false; |