summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-03-15 14:08:54 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-15 14:51:50 +0100
commit1741f6890c9ad51c7541fff8fed450c8c4da9654 (patch)
tree7b785275e4e0deef51466a81cdbe11888cd221dc /tests/auto
parent006a49b19ac100df587f23eb76dc4ba8855047a0 (diff)
UTF8-Codec test: Fix compilation with g++/C++0X.
Change-Id: I704f8d1b07ca371c36e4eecc52c80ac783e3da3c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/codecs/utf8/tst_utf8.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
index e07b7cb239..dd6774e101 100644
--- a/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
+++ b/tests/auto/corelib/codecs/utf8/tst_utf8.cpp
@@ -322,7 +322,7 @@ void tst_Utf8::nonCharacters_data()
// U+FDD0 through U+FDEF
for (int i = 0; i < 16; ++i) {
- char utf8[] = { 0357, 0267, 0220 + i, 0 };
+ char utf8[] = { char(0357), char(0267), char(0220 + i), 0 };
QString utf16 = QChar(0xfdd0 + i);
QTest::newRow(qPrintable(QString::number(0xfdd0 + i, 16))) << QByteArray(utf8) << utf16;
}
@@ -331,10 +331,10 @@ void tst_Utf8::nonCharacters_data()
for (uint plane = 1; plane <= 16; ++plane) {
for (uint lower = 0xfffe; lower < 0x10000; ++lower) {
uint ucs4 = (plane << 16) | lower;
- char utf8[] = { 0xf0 | uchar(ucs4 >> 18),
- 0x80 | (uchar(ucs4 >> 12) & 0x3f),
- 0x80 | (uchar(ucs4 >> 6) & 0x3f),
- 0x80 | (uchar(ucs4) & 0x3f),
+ char utf8[] = { char(0xf0 | uchar(ucs4 >> 18)),
+ char(0x80 | (uchar(ucs4 >> 12) & 0x3f)),
+ char(0x80 | (uchar(ucs4 >> 6) & 0x3f)),
+ char(0x80 | (uchar(ucs4) & 0x3f)),
0 };
ushort utf16[] = { QChar::highSurrogate(ucs4), QChar::lowSurrogate(ucs4), 0 };