summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qregexp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/text/qregexp')
-rw-r--r--tests/auto/corelib/text/qregexp/tst_qregexp.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/corelib/text/qregexp/tst_qregexp.cpp b/tests/auto/corelib/text/qregexp/tst_qregexp.cpp
index d1dad01abb..b043d023ea 100644
--- a/tests/auto/corelib/text/qregexp/tst_qregexp.cpp
+++ b/tests/auto/corelib/text/qregexp/tst_qregexp.cpp
@@ -895,19 +895,19 @@ void tst_QRegExp::testInvalidWildcard(){
void tst_QRegExp::caretAnchoredOptimization()
{
QString s = "---babnana----";
- s.replace( QRegExp("^-*|(-*)$"), "" );
+ s = QRegExp("^-*|(-*)$").replaceIn(s, "" );
QCOMPARE(s, QLatin1String("babnana"));
s = "---babnana----";
- s.replace( QRegExp("^-*|(-{0,})$"), "" );
+ s = QRegExp("^-*|(-{0,})$").replaceIn(s, "" );
QCOMPARE(s, QLatin1String("babnana"));
s = "---babnana----";
- s.replace( QRegExp("^-*|(-{1,})$"), "" );
+ s = QRegExp("^-*|(-{1,})$").replaceIn(s, "" );
QCOMPARE(s, QLatin1String("babnana"));
s = "---babnana----";
- s.replace( QRegExp("^-*|(-+)$"), "" );
+ s = QRegExp("^-*|(-+)$").replaceIn(s, "" );
QCOMPARE(s, QLatin1String("babnana"));
}