diff options
Diffstat (limited to 'tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp')
-rw-r--r-- | tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp index e2cad08..258d8dc 100644 --- a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp +++ b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp @@ -149,6 +149,7 @@ private slots: void taskQTBUG_5008_textFromValueAndValidate(); void taskQTBUG_6670_selectAllWithPrefix(); + void taskQTBUG_6496_fiddlingWithPrecision(); public slots: void valueChangedHelper(const QString &); @@ -1096,5 +1097,17 @@ void tst_QDoubleSpinBox::taskQTBUG_6670_selectAllWithPrefix() QCOMPARE(spin.value(), 12.); } +void tst_QDoubleSpinBox::taskQTBUG_6496_fiddlingWithPrecision() +{ + QDoubleSpinBox dsb; + dsb.setRange(0, 0.991); + dsb.setDecimals(1); + QCOMPARE(dsb.maximum(), 1.0); + dsb.setDecimals(2); + QCOMPARE(dsb.maximum(), 0.99); + dsb.setDecimals(3); + QCOMPARE(dsb.maximum(), 0.991); +} + QTEST_MAIN(tst_QDoubleSpinBox) #include "tst_qdoublespinbox.moc" |