summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
index eef293136a..ad48ebf047 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
+++ b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
@@ -154,8 +154,12 @@ static void generateDataFromFile(const QString &fname)
bool ok = true;
uint ucs4 = part.toInt(&ok, 16);
QVERIFY(ok && ucs4 > 0);
- QVERIFY(!QChar::requiresSurrogates(ucs4));
- testString.append(QChar(ucs4));
+ if (QChar::requiresSurrogates(ucs4)) {
+ testString.append(QChar::highSurrogate(ucs4));
+ testString.append(QChar::lowSurrogate(ucs4));
+ } else {
+ testString.append(QChar(ucs4));
+ }
}
QVERIFY(!testString.isEmpty());
QVERIFY(!expectedBreakPositions.isEmpty());