summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
index 9430425532..238d8626c3 100644
--- a/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
+++ b/tests/auto/corelib/tools/qregularexpression/tst_qregularexpression.cpp
@@ -191,9 +191,8 @@ bool operator!=(const QList<Match> &expectedMatchList, const QRegularExpressionM
void consistencyCheck(const QRegularExpressionMatch &match)
{
- QVERIFY(match.isValid() == match.regularExpression().isValid());
-
if (match.isValid()) {
+ QVERIFY(match.regularExpression().isValid());
QVERIFY(!(match.hasMatch() && match.hasPartialMatch()));
if (match.hasMatch() || match.hasPartialMatch()) {
@@ -260,7 +259,9 @@ void consistencyCheck(const QRegularExpressionMatchIterator &iterator)
}
} else {
QVERIFY(!i.hasNext());
+ QTest::ignoreMessage(QtWarningMsg, "QRegularExpressionMatchIterator::peekNext() called on an iterator already at end");
QRegularExpressionMatch peeked = i.peekNext();
+ QTest::ignoreMessage(QtWarningMsg, "QRegularExpressionMatchIterator::next() called on an iterator already at end");
QRegularExpressionMatch match = i.next();
consistencyCheck(peeked);
consistencyCheck(match);