summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlocale
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2011-04-14 11:08:53 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-04-14 11:19:30 (GMT)
commit6e74302238fbac8783eab36f7553eb30dc5ca352 (patch)
tree0d50664eaf6348b18c5e97d585f3e1f800f62e0a /tests/auto/qlocale
parent95e2bf3d87543da8caabd090057da818ccf2ca4c (diff)
downloadQt-6e74302238fbac8783eab36f7553eb30dc5ca352.zip
Qt-6e74302238fbac8783eab36f7553eb30dc5ca352.tar.gz
Qt-6e74302238fbac8783eab36f7553eb30dc5ca352.tar.bz2
QLocale: Fixed double to currency string conversion on Mac.
This also fixes the autotest failure on mac with macDefaultLocale test. Reviewed-by: trustme (cherry picked from commit 78d47f520b2c4acdf782d39311063f5d44376913)
Diffstat (limited to 'tests/auto/qlocale')
-rw-r--r--tests/auto/qlocale/tst_qlocale.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qlocale/tst_qlocale.cpp b/tests/auto/qlocale/tst_qlocale.cpp
index cabf12e..2b7eaae 100644
--- a/tests/auto/qlocale/tst_qlocale.cpp
+++ b/tests/auto/qlocale/tst_qlocale.cpp
@@ -1130,10 +1130,10 @@ void tst_QLocale::macDefaultLocale()
const QString timeString = locale.toString(QTime(1,2,3), QLocale::LongFormat);
QVERIFY(timeString.contains(QString("1:02:03")));
- QCOMPARE(locale.toCurrencyString(qulonglong(1234)), QString("$1,234"));
- QCOMPARE(locale.toCurrencyString(qlonglong(-1234)), QString("$-1,234"));
+ QCOMPARE(locale.toCurrencyString(qulonglong(1234)), QString("$1,234.00"));
+ QCOMPARE(locale.toCurrencyString(qlonglong(-1234)), QString("($1,234.00)"));
QCOMPARE(locale.toCurrencyString(double(1234.56)), QString("$1,234.56"));
- QCOMPARE(locale.toCurrencyString(double(-1234.56)), QString("$-1,234.56"));
+ QCOMPARE(locale.toCurrencyString(double(-1234.56)), QString("($1,234.56)"));
// Depending on the configured time zone, the time string might not
// contain a GMT specifier. (Sometimes it just names the zone, like "CEST")