From 75767c69fbba3149a4505287ed441886188a9fd3 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Fri, 6 May 2011 14:43:03 +1000 Subject: Remove Q_ASSERT from algorithms autotest Report a meaningful warning message rather than aborting in a debug build and failing silently in a release build. Change-Id: Ic77589143ff0d22c95c7b10f2e511f68b3da4d86 Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern --- tests/auto/qalgorithms/tst_qalgorithms.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/auto/qalgorithms/tst_qalgorithms.cpp b/tests/auto/qalgorithms/tst_qalgorithms.cpp index 8dd7cbc..f0ae08c 100644 --- a/tests/auto/qalgorithms/tst_qalgorithms.cpp +++ b/tests/auto/qalgorithms/tst_qalgorithms.cpp @@ -241,7 +241,8 @@ QList testAlgorithm(Algorithm &algorithm, QStringList dataSetTypes, foreach(QString dataSetType, dataSetTypes) { QVector container = generateData(dataSetType, size); results.append(testRun(container, algorithm, time)); - Q_ASSERT(isSorted(container)); + if (!isSorted(container)) + qWarning("%s: container is not sorted after test", Q_FUNC_INFO); } return results; } -- cgit v0.12