Преглед изворни кода

Fix ctkDoubleSpinBoxTest when setting range to the smallest double

Julien Finet пре 12 година
родитељ
комит
c674a4a424
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      Libs/Widgets/Testing/Cpp/ctkDoubleSpinBoxTest.cpp

+ 2 - 2
Libs/Widgets/Testing/Cpp/ctkDoubleSpinBoxTest.cpp

@@ -192,8 +192,8 @@ void ctkDoubleSpinBoxTester::testSetRange_data()
   QTest::newRow("[min,max]")
   QTest::newRow("[min,max]")
     << std::numeric_limits<double>::min()
     << std::numeric_limits<double>::min()
     << std::numeric_limits<double>::max()
     << std::numeric_limits<double>::max()
-    << std::numeric_limits<double>::min()
-    << std::numeric_limits<double>::max()
+    << 0. // rounded (see QDoubleSpinBox::setMinimum() doc)
+    << QVariant(std::numeric_limits<double>::max()).toDouble()
     << 25.;
     << 25.;
   QTest::newRow("[-max,max]")
   QTest::newRow("[-max,max]")
     << -std::numeric_limits<double>::max()
     << -std::numeric_limits<double>::max()