summaryrefslogtreecommitdiffstats
path: root/tests/auto/qalgorithms
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-05-06 04:43:03 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-05-06 07:25:21 (GMT)
commit75767c69fbba3149a4505287ed441886188a9fd3 (patch)
tree08927af357f52edc6f153db192af0f4059487f82 /tests/auto/qalgorithms
parenta0496d1db09dfaa6a2b31a5c23e154de7b4a2eb7 (diff)
downloadQt-75767c69fbba3149a4505287ed441886188a9fd3.zip
Qt-75767c69fbba3149a4505287ed441886188a9fd3.tar.gz
Qt-75767c69fbba3149a4505287ed441886188a9fd3.tar.bz2
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
Diffstat (limited to 'tests/auto/qalgorithms')
-rw-r--r--tests/auto/qalgorithms/tst_qalgorithms.cpp3
1 files changed, 2 insertions, 1 deletions
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<ResultSet> testAlgorithm(Algorithm &algorithm, QStringList dataSetTypes,
foreach(QString dataSetType, dataSetTypes) {
QVector<DataType> container = generateData<DataType>(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;
}