diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2011-05-18 10:44:47 +1000 |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2011-05-18 10:57:56 +1000 |
commit | 6e50394c4eac9b3e91f6df7e944181cf7f54b0fe (patch) | |
tree | 5d59d83c15f75dacad3036065603e0dd0a8e7727 /tests/auto/qsplitter | |
parent | b8af05d3e2e7914c4edac5ae1e61f55ab76100bc (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
(cherry picked from commit 3475168550c1a804f04f2a4edfeb30c04cd36551)
Change-Id: Ic39972b685ca35a9a71d9c8d03e8dae31481fb19
Diffstat (limited to 'tests/auto/qsplitter')
-rw-r--r-- | tests/auto/qsplitter/tst_qsplitter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qsplitter/tst_qsplitter.cpp b/tests/auto/qsplitter/tst_qsplitter.cpp index 0482661515..60be94417d 100644 --- a/tests/auto/qsplitter/tst_qsplitter.cpp +++ b/tests/auto/qsplitter/tst_qsplitter.cpp @@ -1340,14 +1340,14 @@ void tst_QSplitter::task187373_addAbstractScrollAreas() QFETCH(QString, className); QFETCH(bool, addInConstructor); QFETCH(bool, addOutsideConstructor); - Q_ASSERT(addInConstructor || addOutsideConstructor); + QVERIFY(addInConstructor || addOutsideConstructor); QSplitter *splitter = new QSplitter; splitter->show(); - Q_ASSERT(splitter->isVisible()); + QVERIFY(splitter->isVisible()); QAbstractScrollArea *w = task187373_createScrollArea(splitter, className, addInConstructor); - Q_ASSERT(w); + QVERIFY(w); if (addOutsideConstructor) splitter->addWidget(w); |