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)
This commit is contained in:
parent
51b23f75df
commit
72fb879764
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user