summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-13 16:38:01 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-10-14 08:32:42 +0000
commitf0a559f1c8dcf4b78c11853316919783823ded7a (patch)
treed5199ce97c70001b7db6cbba4082d8699c90abaf /tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
parenta2a00eb044596f3e3f628b6b20b38a5ba524915c (diff)
Tests: Use QCOMPARE() with QLatin1String() for QString values.
Prefer QCOMPARE over QVERIFY for equality and use QLatin1String(). Change-Id: If226a0fc7b25be3e6774c7e36ca1e6f99234e5dd Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'tests/auto/corelib/tools/qregexp/tst_qregexp.cpp')
-rw-r--r--tests/auto/corelib/tools/qregexp/tst_qregexp.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
index b9a3fc13c5..23259e520f 100644
--- a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
+++ b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp
@@ -880,19 +880,19 @@ void tst_QRegExp::caretAnchoredOptimization()
{
QString s = "---babnana----";
s.replace( QRegExp("^-*|(-*)$"), "" );
- QVERIFY(s == "babnana");
+ QCOMPARE(s, QLatin1String("babnana"));
s = "---babnana----";
s.replace( QRegExp("^-*|(-{0,})$"), "" );
- QVERIFY(s == "babnana");
+ QCOMPARE(s, QLatin1String("babnana"));
s = "---babnana----";
s.replace( QRegExp("^-*|(-{1,})$"), "" );
- QVERIFY(s == "babnana");
+ QCOMPARE(s, QLatin1String("babnana"));
s = "---babnana----";
s.replace( QRegExp("^-*|(-+)$"), "" );
- QVERIFY(s == "babnana");
+ QCOMPARE(s, QLatin1String("babnana"));
}
void tst_QRegExp::isEmpty()