summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-09-06 10:49:40 +0200
committerSamuel Rødal <samuel.rodal@nokia.com>2011-09-06 10:55:40 +0200
commita6b6e760ac2f019b9ca42847b9535207966811aa (patch)
treecdba2823eb3708f7a40593ff69b81d2be88515ea /tests/auto/corelib/tools
parent48ba459580c9e4ce28dbb2c3ce433175148da5a1 (diff)
parent8ed47d961dc7e6f161030654d11cd330a542eadf (diff)
Merge remote branch 'gerrit/master' into HEAD
Conflicts: configure.exe src/corelib/global/qglobal.h src/gui/kernel/qplatformnativeinterface_qpa.h src/gui/widgets/qlinecontrol.cpp src/gui/widgets/qmenu_mac.mm src/gui/widgets/qmenu_p.h src/gui/widgets/qmenubar.cpp src/gui/widgets/qmenubar_p.h src/gui/widgets/widgets.pri src/plugins/platforms/wayland/qwaylandnativeinterface.cpp src/plugins/platforms/wayland/qwaylandnativeinterface.h src/src.pro tests/auto/qdir/tst_qdir.cpp tests/auto/qfileinfo/tst_qfileinfo.cpp tests/auto/qsslsocket/tst_qsslsocket.cpp tests/auto/qstring/tst_qstring.cpp Change-Id: I64cf2cefa532ba87a92f632e3595ce6914183e9b
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index 256bbcf4fc..5ef8d70ef6 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -5086,24 +5086,28 @@ void tst_QString::toUpperLower_icu()
QLocale::setDefault(QLocale(QLocale::Turkish, QLocale::Turkey));
+ QCOMPARE(s.toUpper(), QString::fromLatin1("I"));
+ QCOMPARE(s.toLower(), QString::fromLatin1("i"));
+
// turkish locale has a capital I with a dot (U+0130, utf8 c4b0)
+ QLocale l;
- QCOMPARE(s.toUpper(), QString::fromUtf8("\xc4\xb0"));
- QCOMPARE(QString::fromUtf8("\xc4\xb0").toLower(), s);
+ QCOMPARE(l.toUpper(s), QString::fromUtf8("\xc4\xb0"));
+ QCOMPARE(l.toLower(QString::fromUtf8("\xc4\xb0")), s);
// nothing should happen here
- QCOMPARE(s.toLower(), s);
- QCOMPARE(QString::fromLatin1("I").toUpper(), QString::fromLatin1("I"));
+ QCOMPARE(l.toLower(s), s);
+ QCOMPARE(l.toUpper(QString::fromLatin1("I")), QString::fromLatin1("I"));
// U+0131, utf8 c4b1 is the lower-case i without a dot
QString sup = QString::fromUtf8("\xc4\xb1");
- QCOMPARE(sup.toUpper(), QString::fromLatin1("I"));
- QCOMPARE(QString::fromLatin1("I").toLower(), sup);
+ QCOMPARE(l.toUpper(sup), QString::fromLatin1("I"));
+ QCOMPARE(l.toLower(QString::fromLatin1("I")), sup);
// nothing should happen here
- QCOMPARE(sup.toLower(), sup);
- QCOMPARE(QString::fromLatin1("i").toLower(), QString::fromLatin1("i"));
+ QCOMPARE(l.toLower(sup), sup);
+ QCOMPARE(l.toLower(QString::fromLatin1("i")), QString::fromLatin1("i"));
// the cleanup function will restore the default locale
}