From 50a59621deba72629cf71027bbc8112d5d8ae0eb Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Mon, 13 Feb 2017 15:45:00 +0100 Subject: tst_qlocale::macDefaultLocale - remove flaky/incorrect test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Edward Welbourne (cherry picked from commit 5542e772d6e0690b7d8b3ac0ae591331401e871a) Reviewed-by: Heikki Halmet Reviewed-by: Tor Arne Vestbø --- tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 2 -- 1 file changed, 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 -- cgit v1.2.3