mirror of https://github.com/qt/qtbase.git
Compare QValidatory::State values as such for better output
QCOMPARE() can handle enums gracefully, so don't cast to int just for that. Remove some surplus blank lines while I'm here. Pick-to: 6.10 Change-Id: I0797631dc4f7631e8621ad45ac09f68e9295bca6 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
parent
081062ea5e
commit
cbaaa5a9e1
|
@ -143,7 +143,6 @@ void tst_QIntValidator::validate_data()
|
|||
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()
|
||||
|
@ -156,10 +155,8 @@ void tst_QIntValidator::validateArabic()
|
|||
validator.setLocale(QLocale(QLocale::Arabic, QLocale::SaudiArabia));
|
||||
int i;
|
||||
QCOMPARE(validator.validate(arabicNum, i), QValidator::Acceptable);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void tst_QIntValidator::validateFrench()
|
||||
{
|
||||
QIntValidator validator(-2000, 2000, 0);
|
||||
|
@ -200,7 +197,7 @@ void tst_QIntValidator::validate()
|
|||
QIntValidator iv(minimum, maximum, 0);
|
||||
iv.setLocale(QLocale::C);
|
||||
int dummy;
|
||||
QCOMPARE((int)iv.validate(value, dummy), (int)state);
|
||||
QCOMPARE(iv.validate(value, dummy), state);
|
||||
}
|
||||
|
||||
void tst_QIntValidator::notifySignals()
|
||||
|
|
Loading…
Reference in New Issue