diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-04-12 14:53:36 +1000 |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2011-04-12 15:38:20 +1000 |
commit | 3475168550c1a804f04f2a4edfeb30c04cd36551 (patch) | |
tree | ec1587bdc87e6f554c31e09cb1a3a2e26f16b181 /tests/auto/qbuffer | |
parent | 78722d6b6e9ba0f6de1a4eba232aad2f96a339f2 (diff) |
Reduce usage of Q_ASSERT in autotests.
Using Q_ASSERT does nothing in release-mode builds, and in debug builds
it causes tests to terminate prematurely. It is much better to use
QVERIFY or QCOMPARE.
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests/auto/qbuffer')
-rw-r--r-- | tests/auto/qbuffer/tst_qbuffer.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/auto/qbuffer/tst_qbuffer.cpp b/tests/auto/qbuffer/tst_qbuffer.cpp index 3e3cc739bf..5d6b84f827 100644 --- a/tests/auto/qbuffer/tst_qbuffer.cpp +++ b/tests/auto/qbuffer/tst_qbuffer.cpp @@ -309,8 +309,7 @@ void tst_QBuffer::seekTest() // (see Task 184730) { char c; - const int offset = 1; - Q_ASSERT(offset > 0); // any positive integer will do + const int offset = 1; // any positive integer will do const qint64 pos = buf.size() + offset; QVERIFY(buf.seek(pos)); QCOMPARE(buf.pos(), pos); |