summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-04-20 01:05:55 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-04-20 01:36:00 (GMT)
commit34c077faae538adc12d4aa28113640570dfc8728 (patch)
treedc5a2dff26dd0b656455748848fcd68cc4ab74f7
parent70f42ced8e01ddf0098b143e5804c22d55ebf16f (diff)
downloadQt-34c077faae538adc12d4aa28113640570dfc8728.zip
Qt-34c077faae538adc12d4aa28113640570dfc8728.tar.gz
Qt-34c077faae538adc12d4aa28113640570dfc8728.tar.bz2
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
-rw-r--r--tests/auto/qcompleter/tst_qcompleter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qcompleter/tst_qcompleter.cpp b/tests/auto/qcompleter/tst_qcompleter.cpp
index afcc433..9cb2468 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);
}