Bring back QDoubleSpinBox test.
authorFrederik Gladhorn <frederik.gladhorn@nokia.com>
Mon, 24 Oct 2011 12:14:37 +0000 (14:14 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 25 Oct 2011 13:16:56 +0000 (15:16 +0200)
Returning text "1.00" instead of "1" sounds right to me.
Checking the test before the widget is shown/validated sounds pointless.

Change-Id: Ifc9e51dc9448a5bb3afbd566fe10524fbabc654f
Reviewed-by: Kristoffer Flottorp <kristoffer.flottorp@nokia.com>
tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro
tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp

index 5a3b036..cc66eaa 100644 (file)
@@ -2,5 +2,3 @@ CONFIG += testcase
 TARGET = tst_qdoublespinbox
 QT += widgets testlib
 SOURCES  += tst_qdoublespinbox.cpp
-
-CONFIG += insignificant_test # QTBUG-21402
index 15f38e3..cec6048 100644 (file)
@@ -854,6 +854,7 @@ void tst_QDoubleSpinBox::removeAll()
 void tst_QDoubleSpinBox::task54433()
 {
     DoubleSpinBox priceSpinBox;
+    QCOMPARE(priceSpinBox.decimals(), 2);
     priceSpinBox.show();
     priceSpinBox.setRange(0.0, 999.99);
     priceSpinBox.setDecimals(2);
@@ -1012,13 +1013,9 @@ void tst_QDoubleSpinBox::task221221()
 {
     QDoubleSpinBox spin;
     QTest::keyClick(&spin, Qt::Key_1);
-    QCOMPARE(spin.text(), QLatin1String("1"));
     spin.show();
-#ifdef Q_WS_X11
-    qt_x11_wait_for_window_manager(&spin);
-#endif
     QVERIFY(spin.isVisible());
-    QCOMPARE(spin.text(), QLatin1String("1"));
+    QCOMPARE(spin.text(), QLatin1String("1.00"));
 }
 
 void tst_QDoubleSpinBox::task255471_decimalsValidation()