diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2010-11-10 12:21:02 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2010-11-10 12:23:23 (GMT) |
commit | b7d91c0d798bc10dd4f8a750723285076fb96935 (patch) | |
tree | 684950306ef37a322d27b27532161b91cb75ebb8 /tests/auto | |
parent | 7b14625eb9a85406e7851fa1c37c3bfa2acec3cc (diff) | |
download | Qt-b7d91c0d798bc10dd4f8a750723285076fb96935.zip Qt-b7d91c0d798bc10dd4f8a750723285076fb96935.tar.gz Qt-b7d91c0d798bc10dd4f8a750723285076fb96935.tar.bz2 |
Fix auto-test regression in tst_QDoubleValidator
The locale from a previous test was not cleared.
Another issue has been detected, though, and reported as QTBUG-15210.
Reviewed-by: Thierry
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp b/tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp index 3470456..98c4740 100644 --- a/tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp +++ b/tests/auto/qdoublevalidator/tst_qdoublevalidator.cpp @@ -218,6 +218,9 @@ void tst_QDoubleValidator::validate_data() QTest::newRow("data_QTBUG_14935-1") << "de" << 0.0 << 1.0 << 5 << QString("0.31") << ACC << ACC; QTest::newRow("data_QTBUG_14935-2") << "de" << 0.0 << 1000000.0 << 5 << QString("3.123") << ACC << ACC; QTest::newRow("data_QTBUG_14935-3") << "de" << 0.0 << 1000000.0 << 5 << QString("123,345.678") << ACC << ACC; + + QTest::newRow("data_de_problem-1") << "de" << 0.0 << 10.0 << 0 << QString("1.0") << ITM << ITM; + QTest::newRow("data_de_problem-2") << "de" << 0.0 << 10.0 << 0 << QString("0.1") << INV << INV; } void tst_QDoubleValidator::validate() @@ -230,6 +233,9 @@ void tst_QDoubleValidator::validate() QFETCH(QValidator::State, scientific_state); QFETCH(QValidator::State, standard_state); + QEXPECT_FAIL("data_de_problem-1", "To be fixed. See QTBUG-15210.", Abort); + QEXPECT_FAIL("data_de_problem-2", "To be fixed. See QTBUG-15210.", Abort); + QLocale::setDefault(QLocale(localeName)); QDoubleValidator dv(minimum, maximum, decimals, 0); @@ -312,6 +318,8 @@ void tst_QDoubleValidator::validateIntEquiv() QFETCH(QString, input); QFETCH(QValidator::State, state); + QLocale::setDefault(QLocale("C")); + QDoubleValidator dv(minimum, maximum, 0, 0); dv.setNotation(QDoubleValidator::StandardNotation); int dummy; |