From 3475168550c1a804f04f2a4edfeb30c04cd36551 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 12 Apr 2011 14:53:36 +1000 Subject: 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 --- tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/qdatetimeedit') diff --git a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp index c8c3b90712..98632ae853 100644 --- a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp @@ -2751,7 +2751,7 @@ void tst_QDateTimeEdit::setCurrentSection() QFETCH(QList, setCurrentSections); QFETCH(QList, expectedCursorPositions); - Q_ASSERT(setCurrentSections.size() == expectedCursorPositions.size()); + QCOMPARE(setCurrentSections.size(), expectedCursorPositions.size()); testWidget->setDisplayFormat(format); testWidget->setDateTime(dateTime); #ifdef Q_WS_MAC -- cgit v1.2.3