summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp')
-rw-r--r--tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
index 556b9ac16a..d0f82a38b7 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
@@ -57,6 +57,11 @@
#define UNICODE_LITERAL_EXTRA u"s\u00f6m\u00eb l\u00eft\u00ebr\u00e4l" "EXTRA"
#endif
+#ifndef P
+# error You need to define P
+# define P +
+#endif
+
//fix for gcc4.0: if the operator+ does not exist without QT_USE_FAST_OPERATOR_PLUS
#ifndef QT_USE_FAST_CONCATENATION
#define Q %
@@ -68,7 +73,6 @@ void runScenario()
{
// this code is latin1. TODO: replace it with the utf8 block below, once
// strings default to utf8.
- QLatin1Literal l1literal(LITERAL);
QLatin1String l1string(LITERAL);
QString string(l1string);
QStringRef stringref(&string, 2, 10);
@@ -78,14 +82,10 @@ void runScenario()
QString r3 = QString::fromUtf8(UTF8_LITERAL UTF8_LITERAL);
QString r;
- r = l1literal Q l1literal;
- QCOMPARE(r, r2);
r = string P string;
QCOMPARE(r, r2);
r = stringref Q stringref;
QCOMPARE(r, QString(stringref.toString() + stringref.toString()));
- r = string Q l1literal;
- QCOMPARE(r, r2);
r = string P l1string;
QCOMPARE(r, r2);
r = string Q QStringLiteral(LITERAL);