diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2017-02-13 15:45:00 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-02-15 07:43:26 +0000 |
commit | 5542e772d6e0690b7d8b3ac0ae591331401e871a (patch) | |
tree | 2e50a3c04d47ccdcfe060d008519ffbac561dcd5 | |
parent | 0b30a6e6aad513500811faa78ce80af6df46c82a (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>
-rw-r--r-- | tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 2 |
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 f56cff4d29..6f20e3db91 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -1589,9 +1589,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 |