diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-04-20 11:05:55 +1000 |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2011-05-18 10:46:41 +1000 |
commit | 8ccb06a718a50e65288422d7a79da8317e372d67 (patch) | |
tree | 8d474b6d59a23539f556fbdd3ba53631ac31b4ce /tests/auto/qcompleter | |
parent | 94a7d439f28f7c171274b801f2a329aa57189589 (diff) |
Remove Q_ASSERT from qcompleter autotest.
Replace obscure failure on bad test data in debug builds with an
informative warning in all builds.
Change-Id: I9001820f34de2f78bf296a2f0e095ce73d9ac4bd
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 34c077faae538adc12d4aa28113640570dfc8728)
Diffstat (limited to 'tests/auto/qcompleter')
-rw-r--r-- | tests/auto/qcompleter/tst_qcompleter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qcompleter/tst_qcompleter.cpp b/tests/auto/qcompleter/tst_qcompleter.cpp index 932c19ea54..1bb21eb788 100644 --- a/tests/auto/qcompleter/tst_qcompleter.cpp +++ b/tests/auto/qcompleter/tst_qcompleter.cpp @@ -277,7 +277,9 @@ retry: case 'L': row = completer->completionCount() - 1; break; case 'F': row = 0; break; default: - Q_ASSERT(false); + QFAIL(qPrintable(QString( + "Problem with 'step' value in test data: %1 (only P, N, L and F are allowed)." + ).arg(step[i]))); } completer->setCurrentRow(row); } |