diff options
Diffstat (limited to 'tests/auto/corelib/text/qstring/tst_qstring.cpp')
-rw-r--r-- | tests/auto/corelib/text/qstring/tst_qstring.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp index 8f77d03226..6e1b47a839 100644 --- a/tests/auto/corelib/text/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp @@ -3963,8 +3963,16 @@ void tst_QString::check_QTextIOStream() { a=""; QTextStream ts(&a); + // invalid Utf8 ts << "pi \261= " << 3.125; - QCOMPARE(a, QString::fromLatin1("pi \261= 3.125")); + QCOMPARE(a, QString::fromUtf16(u"pi \xfffd= 3.125")); + } + { + a=""; + QTextStream ts(&a); + // valid Utf8 + ts << "pi ø= " << 3.125; + QCOMPARE(a, QString::fromUtf16(u"pi ø= 3.125")); } { a="123 456"; |