Skip qquicktimeline auto test
authorBernd Weimer <bweimer@blackberry.com>
Wed, 23 Apr 2014 13:47:10 +0000 (15:47 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 25 Apr 2014 07:02:21 +0000 (09:02 +0200)
On platforms where casting qreal value infinity to int yields a
positive value the test will fail. Test will be skipped on those
platforms.

Change-Id: I9f373a9598ffd72e857c96edce3df216070326c9
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
tests/auto/quick/qquicktimeline/tst_qquicktimeline.cpp

index e9fbb54..9b62eb3 100644 (file)
@@ -53,6 +53,12 @@ private slots:
 
 void tst_QQuickTimeLine::overflow()
 {
+    // Test ensures that time value used in QQuickTimeLine::accel methods is always positive.
+    // On platforms where casting qreal value infinity to int yields a positive value this is
+    // always the case and the test would fail. Strictly speaking, the cast is undefined behavior.
+    if (static_cast<int>(qInf()) > 0)
+        QSKIP("Test is not applicable on this platform");
+
     QQuickTimeLine timeline;
     QQuickTimeLineValue value;