summaryrefslogtreecommitdiffstats
path: root/tests/auto/qalgorithms
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-05-06 14:43:03 +1000
committerRohan McGovern <rohan.mcgovern@nokia.com>2011-05-18 10:46:46 +1000
commit72fb8797642ec4c9151fcd805e377bd52e4c1756 (patch)
tree6affc587808b384a310444dad8852d3ce416e1b1 /tests/auto/qalgorithms
parent51b23f75df6474cb5a185d482f99c6ff663215f5 (diff)
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 (cherry picked from commit 75767c69fbba3149a4505287ed441886188a9fd3)
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 d0d8e9aead..f14ba1f140 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;
}