Remove Q_ASSERT from qtesselator autotest
authorJason McDonald <jason.mcdonald@nokia.com>
Tue, 3 May 2011 05:03:35 +0000 (15:03 +1000)
committerRohan McGovern <rohan.mcgovern@nokia.com>
Wed, 18 May 2011 00:46:44 +0000 (10:46 +1000)
If the test data is incorrect, print a meaningful error message into the
test output.

Change-Id: I505a86b4411619d3c3be9541c96c082f92589ff7
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 8e12d9e322ec7d8f7eece09b6f15cba640615f9e)

tests/auto/qtessellator/oldtessellator.cpp

index 78f117f..10b8710 100644 (file)
@@ -218,7 +218,8 @@ void old_tesselate_polygon(QVector<XTrapezoid> *traps, const QPointF *pg, int pg
     qreal ymax(INT_MIN/256);
 
     //painter.begin(pg, pgSize);
-    Q_ASSERT(pg[0] == pg[pgSize-1]);
+    if (pg[0] != pg[pgSize-1])
+        qWarning() << Q_FUNC_INFO << "Malformed polygon (first and last points must be identical)";
     // generate edge table
 //     qDebug() << "POINTS:";
     for (int x = 0; x < pgSize-1; ++x) {