summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMikko Knuutila <Mikko.Knuutila@Digia.com>2011-11-11 13:15:29 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-11-11 13:15:29 (GMT)
commitee3f763f3642d1a098e6293fbc586b34a3e6e8be (patch)
tree18e9a436dfa91217740912c899867da83a875d54 /tests/auto
parent22c7a2f69e833789e9b5613f809ea43561624482 (diff)
downloadQt-ee3f763f3642d1a098e6293fbc586b34a3e6e8be.zip
Qt-ee3f763f3642d1a098e6293fbc586b34a3e6e8be.tar.gz
Qt-ee3f763f3642d1a098e6293fbc586b34a3e6e8be.tar.bz2
Added base 10 to be used with QIntValidator.
Fixes an error in QIntValidator, which occurred because locale.toInt() was missing a parameter for base value and this led it to presume wrongly that a base 8 is in use. Task-number: QTBUG-21602 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qintvalidator/tst_qintvalidator.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qintvalidator/tst_qintvalidator.cpp b/tests/auto/qintvalidator/tst_qintvalidator.cpp
index d537635..7e36093 100644
--- a/tests/auto/qintvalidator/tst_qintvalidator.cpp
+++ b/tests/auto/qintvalidator/tst_qintvalidator.cpp
@@ -168,6 +168,15 @@ void tst_QIntValidator::validate_data()
QTest::newRow("8.9") << -1 << 100 << QString("5") << ACC;
QTest::newRow("8.10") << -1 << 100 << QString("+") << INT;
QTest::newRow("8.11") << -1 << 100 << QString("+50") << ACC;
+
+ QTest::newRow("9.0") << -10 << 10 << QString("000") << ACC;
+ QTest::newRow("9.1") << -10 << 10 << QString("008") << ACC;
+ QTest::newRow("9.2") << -10 << 10 << QString("-008") << ACC;
+ QTest::newRow("9.3") << -10 << 10 << QString("00010") << ACC;
+ QTest::newRow("9.4") << -10 << 10 << QString("-00010") << ACC;
+ QTest::newRow("9.5") << -10 << 10 << QString("00020") << INV;
+ QTest::newRow("9.6") << -10 << 10 << QString("-00020") << INV;
+
}
void tst_QIntValidator::validateArabic()