Browse Source

Use an error threshold to compare expected results

Julien Finet 14 years ago
parent
commit
a56a15048c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Libs/Widgets/ctkDoubleSlider.cpp

+ 1 - 1
Libs/Widgets/ctkDoubleSlider.cpp

@@ -273,7 +273,7 @@ void ctkDoubleSlider::setSingleStep(double newStep)
   d->Slider->setValue(d->toInt(d->Value));
   d->Slider->setPageStep(d->toInt(d->PageStep));
   d->Slider->blockSignals(oldBlockSignals);
-  Q_ASSERT(d->Value == d->safeFromInt(d->Slider->value()));
+  Q_ASSERT(qFuzzyCompare(d->Value,d->safeFromInt(d->Slider->value())));
 }
 
 // --------------------------------------------------------------------------