From 3ff8e949257270d6b6d4883cf3f9001e8ae7e927 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 24 Oct 2011 14:14:37 +0200 Subject: Bring back QDoubleSpinBox test. 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 --- tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro | 2 -- tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp | 7 ++----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro b/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro index 5a3b0360e1..cc66eaae26 100644 --- a/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro +++ b/tests/auto/widgets/widgets/qdoublespinbox/qdoublespinbox.pro @@ -2,5 +2,3 @@ CONFIG += testcase TARGET = tst_qdoublespinbox QT += widgets testlib SOURCES += tst_qdoublespinbox.cpp - -CONFIG += insignificant_test # QTBUG-21402 diff --git a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp index 15f38e3334..cec6048e61 100644 --- a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp +++ b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp @@ -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() -- cgit v1.2.3