summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/text/qstring/tst_qstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/text/qstring/tst_qstring.cpp')
-rw-r--r--tests/auto/corelib/text/qstring/tst_qstring.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp
index f3d2594e34..eaf35c969e 100644
--- a/tests/auto/corelib/text/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp
@@ -3442,6 +3442,14 @@ void tst_QString::assign()
str.assign(c16str.begin(), c16str.end());
QCOMPARE(str, c16);
+ const char32_t c32[] = U"٩(⁎❛ᴗ❛⁎)۶ 🤷";
+ str.assign(std::begin(c32), std::end(c32) - 1);
+ QCOMPARE(str, c16);
+
+ std::u32string c32str(c32);
+ str.assign(c32str.begin(), c32str.end());
+ QCOMPARE(str, c16);
+
QVarLengthArray<QLatin1Char, 5> l1ch = {'F'_L1, 'G'_L1, 'H'_L1, 'I'_L1, 'J'_L1};
str.assign(l1ch.begin(), l1ch.end());
QCOMPARE(str, u"FGHIJ");