Remove Q_ASSERT from qcompleter autotest.
authorJason McDonald <jason.mcdonald@nokia.com>
Wed, 20 Apr 2011 01:05:55 +0000 (11:05 +1000)
committerRohan McGovern <rohan.mcgovern@nokia.com>
Wed, 18 May 2011 00:46:41 +0000 (10:46 +1000)
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)

tests/auto/qcompleter/tst_qcompleter.cpp

index 932c19e..1bb21eb 100644 (file)
@@ -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);
     }