summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-04-10 14:53:42 +0300
committerQt by Nokia <qt-info@nokia.com>2012-04-11 01:42:12 +0200
commit8e74b5cfe43893522c0f06d0b0d0dd5b7393aa6f (patch)
tree4ff583a1857f263f6f8edabbbb1de3d897e84492 /tests
parentd7851bbc587b01a3900a8e52b1659f3054f6c3d0 (diff)
fix digitValue() returned 0 instead of -1 for invalid ucs4 characters
Task-number: QTBUG-20318 Change-Id: I96c4c2b042bad478b7c704669e7ea0d574d3b22f Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/tools/qchar/tst_qchar.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qchar/tst_qchar.cpp b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
index e72af11fbb..215f4c18f2 100644
--- a/tests/auto/corelib/tools/qchar/tst_qchar.cpp
+++ b/tests/auto/corelib/tools/qchar/tst_qchar.cpp
@@ -523,6 +523,9 @@ void tst_QChar::digitValue()
QVERIFY(QChar::digitValue((ushort)0x1040) == 0);
QVERIFY(QChar::digitValue((uint)0x1049) == 9);
QVERIFY(QChar::digitValue((uint)0x1040) == 0);
+
+ QVERIFY(QChar::digitValue((ushort)0xd800) == -1);
+ QVERIFY(QChar::digitValue((uint)UNICODE_LAST_CODEPOINT + 1) == -1);
}
void tst_QChar::decomposition()