summaryrefslogtreecommitdiffstats
path: root/tests/auto/qchar
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2012-06-12 00:35:26 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-06-13 08:14:06 (GMT)
commit7be0b570edf8db12fd541bdaa530b2defde71fa2 (patch)
tree1afa20f9419b5aa27df8f6f7ed3eed293979128b /tests/auto/qchar
parent8393c808e1d9b91c75e408fbcd7f4aacd576333c (diff)
downloadQt-7be0b570edf8db12fd541bdaa530b2defde71fa2.zip
Qt-7be0b570edf8db12fd541bdaa530b2defde71fa2.tar.gz
Qt-7be0b570edf8db12fd541bdaa530b2defde71fa2.tar.bz2
UCD 5.0: Apply Unicode Corrigendum #6
http://unicode.org/versions/corrigendum6.html: > in Unicode 5.0, the list of characters with the Bidi_Mirrored property > was made consistent for brackets and quotation marks, in preparation for > new constraints on bidi mirroring. However, after publication of > Unicode 5.0.0 it was discovered that this change adversely affected > several quotation mark characters in deployed data. Task-number: QTBUG-25169 Change-Id: I2cd6a70a69f4b2c37a3f191e05233854a16f10d1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/qchar')
-rw-r--r--tests/auto/qchar/tst_qchar.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/qchar/tst_qchar.cpp b/tests/auto/qchar/tst_qchar.cpp
index c6df716..c3c9f6f 100644
--- a/tests/auto/qchar/tst_qchar.cpp
+++ b/tests/auto/qchar/tst_qchar.cpp
@@ -82,6 +82,7 @@ private slots:
void joining();
void combiningClass();
void digitValue();
+ void mirroredChar();
void decomposition();
// void ligature();
void lineBreakClass();
@@ -448,6 +449,27 @@ void tst_QChar::digitValue()
QVERIFY(QChar::digitValue((uint)0x1040) == 0);
}
+void tst_QChar::mirroredChar()
+{
+ QVERIFY(QChar(0x169B).hasMirrored());
+ QVERIFY(QChar(0x169B).mirroredChar() == QChar(0x169C));
+ QVERIFY(QChar(0x169C).hasMirrored());
+ QVERIFY(QChar(0x169C).mirroredChar() == QChar(0x169B));
+
+ QVERIFY(QChar(0x301A).hasMirrored());
+ QVERIFY(QChar(0x301A).mirroredChar() == QChar(0x301B));
+ QVERIFY(QChar(0x301B).hasMirrored());
+ QVERIFY(QChar(0x301B).mirroredChar() == QChar(0x301A));
+
+ // QTBUG-25169
+ if (QChar::currentUnicodeVersion() <= QChar::Unicode_5_0) {
+ QVERIFY(!QChar(0x201C).hasMirrored());
+ QVERIFY(QChar(0x201C).mirroredChar() != QChar(0x201D));
+ QVERIFY(!QChar(0x201D).hasMirrored());
+ QVERIFY(QChar(0x201D).mirroredChar() != QChar(0x201C));
+ }
+}
+
void tst_QChar::decomposition()
{
QVERIFY(QChar((ushort)0xa0).decompositionTag() == QChar::NoBreak);