diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-23 14:01:35 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-10-23 14:45:03 +0200 |
commit | 790aef362fd195adf97d8c780a7cbbbade27d51f (patch) | |
tree | 8be464687ab21806cfe9f7ada27098b563aa41b2 /tests/auto/corelib/tools/qlocale | |
parent | 9720efbd1035c2e939b0581163e6d804c713dd96 (diff) | |
parent | 07475c662eb73c833da2d461b8ef2702ca1e2cfb (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
.qmake.conf
configure
src/corelib/global/qglobal.h
src/tools/qdoc/node.cpp
src/tools/qdoc/qdocdatabase.cpp
tests/auto/corelib/io/qsettings/tst_qsettings.cpp
tools/configure/configureapp.cpp
Change-Id: I66028ae5e441a06b73ee85ba72a03a3af3e8593f
Diffstat (limited to 'tests/auto/corelib/tools/qlocale')
-rw-r--r-- | tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index 33c8eb303a..edaa00098e 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -902,6 +902,7 @@ void tst_QLocale::long_long_conversion() void tst_QLocale::long_long_conversion_extra() { QLocale l(QLocale::C); + l.setNumberOptions(0); QCOMPARE(l.toString((qlonglong)1), QString("1")); QCOMPARE(l.toString((qlonglong)12), QString("12")); QCOMPARE(l.toString((qlonglong)123), QString("123")); @@ -1613,20 +1614,20 @@ void tst_QLocale::numberOptions() bool ok; QLocale locale(QLocale::C); - QCOMPARE(locale.numberOptions(), 0); - QCOMPARE(locale.toInt(QString("12,345"), &ok), 12345); + QCOMPARE(locale.numberOptions(), QLocale::OmitGroupSeparator); + QCOMPARE(locale.toInt(QString("12345"), &ok), 12345); QVERIFY(ok); QCOMPARE(locale.toInt(QString("12345"), &ok), 12345); QVERIFY(ok); - QCOMPARE(locale.toString(12345), QString("12,345")); + QCOMPARE(locale.toString(12345), QString("12345")); - locale.setNumberOptions(QLocale::OmitGroupSeparator); - QCOMPARE(locale.numberOptions(), QLocale::OmitGroupSeparator); + locale.setNumberOptions(0); + QCOMPARE(locale.numberOptions(), 0); QCOMPARE(locale.toInt(QString("12,345"), &ok), 12345); QVERIFY(ok); QCOMPARE(locale.toInt(QString("12345"), &ok), 12345); QVERIFY(ok); - QCOMPARE(locale.toString(12345), QString("12345")); + QCOMPARE(locale.toString(12345), QString("12,345")); locale.setNumberOptions(QLocale::RejectGroupSeparator); QCOMPARE(locale.numberOptions(), QLocale::RejectGroupSeparator); @@ -2035,10 +2036,10 @@ void tst_QLocale::standaloneMonthName() void tst_QLocale::currency() { const QLocale c(QLocale::C); - QCOMPARE(c.toCurrencyString(qulonglong(1234)), QString("1,234")); - QCOMPARE(c.toCurrencyString(qlonglong(-1234)), QString("-1,234")); - QCOMPARE(c.toCurrencyString(double(1234.56)), QString("1,234.56")); - QCOMPARE(c.toCurrencyString(double(-1234.56)), QString("-1,234.56")); + QCOMPARE(c.toCurrencyString(qulonglong(1234)), QString("1234")); + QCOMPARE(c.toCurrencyString(qlonglong(-1234)), QString("-1234")); + QCOMPARE(c.toCurrencyString(double(1234.56)), QString("1234.56")); + QCOMPARE(c.toCurrencyString(double(-1234.56)), QString("-1234.56")); const QLocale en_US("en_US"); QCOMPARE(en_US.toCurrencyString(qulonglong(1234)), QString("$1,234")); |