summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2017-02-13 15:45:00 +0100
committerTony Sarajärvi <tony.sarajarvi@qt.io>2017-11-13 12:12:39 +0000
commit50a59621deba72629cf71027bbc8112d5d8ae0eb (patch)
tree3647b862d9eb86e24e83b2c4d88339c28893a2ba
parent0707260a4f8e64dfadf1df5f935e74cabb7c7d27 (diff)
tst_qlocale::macDefaultLocale - remove flaky/incorrect test
currencySymbol == "$" does not mean negative currency values will be formatted as "($value)". With all locales I have on my mac machines (10.11/10.12) the result is different from what this test expects. Also, the results are very different for different locales. Apparently, we never saw this problem before since in our CI "macs" we never have US Dollar/en_US selected in System Preferences. Task-number: QTBUG-58784 Change-Id: Ic2c3a3172bf1e715e99092ddee8f461b216d995a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 5542e772d6e0690b7d8b3ac0ae591331401e871a) Reviewed-by: Heikki Halmet <heikki.halmet@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index dc5140a010..5b24c9fe55 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -1454,9 +1454,7 @@ void tst_QLocale::macDefaultLocale()
// To run this test make sure "Curreny" is US Dollar in System Preferences->Language & Region->Advanced.
if (locale.currencySymbol() == QString("$")) {
QCOMPARE(locale.toCurrencyString(qulonglong(1234)), systemLocaleFormatNumber(QString("$1,234.00")));
- QCOMPARE(locale.toCurrencyString(qlonglong(-1234)), systemLocaleFormatNumber(QString("($1,234.00)")));
QCOMPARE(locale.toCurrencyString(double(1234.56)), systemLocaleFormatNumber(QString("$1,234.56")));
- QCOMPARE(locale.toCurrencyString(double(-1234.56)), systemLocaleFormatNumber(QString("($1,234.56)")));
}
// Depending on the configured time zone, the time string might not