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.cpp17
1 files changed, 1 insertions, 16 deletions
diff --git a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
index d0f82a38b7..8955da97fa 100644
--- a/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
+++ b/tests/auto/corelib/tools/qstringbuilder/qstringbuilder1/stringbuilder.cpp
@@ -45,7 +45,7 @@
#define LITERAL_LEN (sizeof(LITERAL)-1)
#define LITERAL_EXTRA "some literal" "EXTRA"
-// "some literal", but replacing all vocals by their umlauted UTF-8 string :)
+// "some literal", but replacing all vowels by their umlauted UTF-8 string :)
#define UTF8_LITERAL "s\xc3\xb6m\xc3\xab l\xc3\xaft\xc3\xabr\xc3\xa4l"
#define UTF8_LITERAL_LEN (sizeof(UTF8_LITERAL)-1)
#define UTF8_LITERAL_EXTRA "s\xc3\xb6m\xc3\xab l\xc3\xaft\xc3\xabr\xc3\xa4l" "EXTRA"
@@ -131,14 +131,6 @@ void runScenario()
r = string P ba;
QCOMPARE(r, r2);
-#if 0
- // now test with codec for C strings set
- // TODO: to be re-enabled once strings default to utf8, in place of the
- // latin1 code above.
- QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
- QVERIFY(QTextCodec::codecForCStrings());
- QCOMPARE(QTextCodec::codecForCStrings()->name(), QByteArray("UTF-8"));
-
string = QString::fromUtf8(UTF8_LITERAL);
ba = UTF8_LITERAL;
@@ -157,7 +149,6 @@ void runScenario()
QCOMPARE(r, r3);
r = string P ba;
QCOMPARE(r, r3);
-#endif
ba = QByteArray(); // empty
r = ba P string;
@@ -217,12 +208,9 @@ void runScenario()
str += QLatin1String(LITERAL) P str;
QCOMPARE(str, QString::fromUtf8(UTF8_LITERAL LITERAL UTF8_LITERAL));
#ifndef QT_NO_CAST_FROM_ASCII
-#if 0
- // TODO: this relies on strings defaulting to utf8, so disable this for now.
str = (QString::fromUtf8(UTF8_LITERAL) += QLatin1String(LITERAL) P UTF8_LITERAL);
QCOMPARE(str, QString::fromUtf8(UTF8_LITERAL LITERAL UTF8_LITERAL));
#endif
-#endif
}
//operator QByteArray +=
@@ -237,14 +225,11 @@ void runScenario()
ba2 += ba2 P withZero;
QCOMPARE(ba2, QByteArray(withZero + withZero + withZero));
#ifndef QT_NO_CAST_TO_ASCII
-#if 0
- // TODO: this relies on strings defaulting to utf8, so disable this for now.
ba = UTF8_LITERAL;
ba2 = (ba += QLatin1String(LITERAL) + QString::fromUtf8(UTF8_LITERAL));
QCOMPARE(ba2, ba);
QCOMPARE(ba, QByteArray(UTF8_LITERAL LITERAL UTF8_LITERAL));
#endif
-#endif
}
}