Remove Q_ASSERT from qtesselator autotest
authorJason McDonald <jason.mcdonald@nokia.com>
Mon, 9 May 2011 05:53:13 +0000 (15:53 +1000)
committerRohan McGovern <rohan.mcgovern@nokia.com>
Wed, 18 May 2011 00:46:47 +0000 (10:46 +1000)
Report a fatal error rather than failing silently in non-debug builds.

Change-Id: I625c5aa6f86a5764cd8f078baa074d6475a67736
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit c0c7e04c9248ce38278aceefeb527f29149cfb4e)

tests/auto/qtessellator/oldtessellator.cpp

index e6a0451..bc24d7e 100644 (file)
@@ -371,7 +371,8 @@ void old_tesselate_polygon(QVector<XTrapezoid> *traps, const QPointF *pg, int pg
            isects[i].edge = edge;
        }
 
-       Q_ASSERT(isects.size()%2 == 1);
+       if (isects.size()%2 != 1)
+           qFatal("%s: number of intersection points must be odd", Q_FUNC_INFO);
 
        // sort intersection points
        qSort(&isects[0], &isects[isects.size()-1], compareIntersections);