summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-05-05 11:37:01 +0300
committerAnton Kudryavtsev <a.kudryavtsev@netris.ru>2016-06-29 14:58:25 +0000
commit5c9e39311757325c82bd5d18789a5caa5297af83 (patch)
tree4cc35c4a54328ebe5c4f4f12b031ad2dec0543cb /tests/auto
parentd0e4f28dea97252cf2e2ca317d5344e1c7a1cdfe (diff)
QString: add some missing overloaded operator+
to keep compatibility with and without using QT_USE_QSTRINGBUILDER. Change-Id: If8218fe0693cdb7ad1250beb272e0e7c356bbf4a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
index 7a361c0693..f6a1432f5c 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
@@ -73,8 +73,22 @@ void runScenario()
QCOMPARE(r, r2);
r = stringref Q stringref;
QCOMPARE(r, QString(stringref.toString() + stringref.toString()));
+ r = stringref P stringref;
+ QCOMPARE(r, QString(stringref.toString() + stringref.toString()));
r = string P l1string;
QCOMPARE(r, r2);
+ r = l1string P stringref;
+ QCOMPARE(r, QString(l1string + stringref.toString()));
+ r = stringref P l1string;
+ QCOMPARE(r, QString(stringref.toString() + l1string));
+ r = stringref P string;
+ QCOMPARE(r, QString(stringref.toString() + string));
+ r = string P stringref;
+ QCOMPARE(r, QString(string + stringref.toString()));
+ r = stringref P achar;
+ QCOMPARE(r, QString(stringref.toString() + achar));
+ r = achar P stringref;
+ QCOMPARE(r, QString(achar + stringref.toString()));
r = string Q QStringLiteral(LITERAL);
QCOMPARE(r, r2);
r = QStringLiteral(LITERAL) Q string;