summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/codecs
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-01-26 11:27:37 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-01-26 11:27:37 +0000
commit0a1af55a9b69f7fd58dbce43a0d4c1faf0143838 (patch)
tree26da168e740734d168be37803abec2f8739b213d /tests/auto/corelib/codecs
parentb8fb0ee999d32401157be8d86e5a03185aadbb9e (diff)
parent158a3a4159bdc5a49caecd63e021dacbc06cf23c (diff)
Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/corelib/codecs')
-rw-r--r--tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
index 413e0c306c..554f0dc68d 100644
--- a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
+++ b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp
@@ -1584,10 +1584,17 @@ void tst_QTextCodec::utf8bom_data()
<< QString("a");
}
- {
+ { // test the non-SIMD code-path
static const ushort data[] = { 0x61, 0xfeff, 0x62 };
- QTest::newRow("middle-bom")
- << QByteArray("a\357\273\277b", 5)
+ QTest::newRow("middle-bom (non SIMD)")
+ << QByteArray("a\357\273\277b")
+ << QString::fromUtf16(data, sizeof(data)/sizeof(short));
+ }
+
+ { // test the SIMD code-path
+ static const ushort data[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0xfeff, 0x6d };
+ QTest::newRow("middle-bom (SIMD)")
+ << QByteArray("abcdefghijkl\357\273\277m")
<< QString::fromUtf16(data, sizeof(data)/sizeof(short));
}
}