[Kst] branches/work/kst/portto4/kst/tests

Adam Treat treat at kde.org
Wed Sep 26 20:03:31 CEST 2007


SVN commit 717348 by treat:

* Get rid of annoying message and just use QVERIFY
for testing eq INF.


 M  +1 -2      testdatasource.cpp  
 M  +3 -6      testscalar.cpp  


--- branches/work/kst/portto4/kst/tests/testdatasource.cpp #717347:717348
@@ -143,8 +143,7 @@
     QCOMPARE(rvp->value()[0], 0.2);
     QVERIFY(rvp->value()[1] != rvp->value()[1]);
 
-    QEXPECT_FAIL("", "Bug in Qt qFuzzyCompare can not compare inf...", Continue);
-    QCOMPARE(rvp->value()[2], INF);
+    QVERIFY(rvp->value()[2] == INF);
 
     QCOMPARE(rvp->value()[3], 0.0);
     rvp = new KstRVector(dsp, "2", KstObjectTag::fromString("RVTestAscii2"), 0, -1, 0, false, false);
--- branches/work/kst/portto4/kst/tests/testscalar.cpp #717347:717348
@@ -84,8 +84,7 @@
   QVERIFY(sp->value() != sp->value());
   sp->setValue(_INF );
 
-  QEXPECT_FAIL("", "Bug in Qt qFuzzyCompare can not compare inf...", Continue);
-  QCOMPARE(sp->value(), _INF );
+  QVERIFY(sp->value() == _INF);
 
   QCOMPARE((*sp = 2.0).value(), 2.0);
   SListener *listener = new SListener;
@@ -129,15 +128,13 @@
   e = n.toElement();
   sp4 = new KstScalar(e);
 
-  QEXPECT_FAIL("", "Bug in Qt qFuzzyCompare can not compare inf...", Continue);
-  QCOMPARE(sp4->value(), _INF);
+  QVERIFY(sp4->value() == _INF);
 
   n = makeDOM1("load4", "-INF").firstChild();
   e = n.toElement();
   sp4 = new KstScalar(e);
 
-  QEXPECT_FAIL("", "Bug in Qt qFuzzyCompare can not compare inf...", Continue);
-  QCOMPARE(sp4->value(), -_INF );
+  QVERIFY(sp4->value() == -_INF);
 
   delete listener;
 }


More information about the Kst mailing list