diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-05-03 15:30:33 +1000 |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2011-05-18 10:46:45 +1000 |
commit | 83fcb8023acf9bdac1d3a97ccb23baa9ad450bea (patch) | |
tree | 03afb9966a7776803e529de78b864a1538700771 /tests/auto | |
parent | 9329ee1c2752ba589d6f33e9f3709a0c2e44aa86 (diff) |
Remove Q_ASSERT from qtesselator autotest
If the test data is incorrect, print a meaningful warning into the test
output.
Change-Id: Ibfe64ef41a0ff3eb47c2385d1c31191334a675a8
Task-number: QTBUG-17582
Reviewed-by: Rohan McGovern
(cherry picked from commit 28ccfa472991c0480e67b5f204a567c4023ba6d4)
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qtessellator/testtessellator.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/qtessellator/testtessellator.cpp b/tests/auto/qtessellator/testtessellator.cpp index 339f05ff16..d8d6f6f5af 100644 --- a/tests/auto/qtessellator/testtessellator.cpp +++ b/tests/auto/qtessellator/testtessellator.cpp @@ -42,6 +42,7 @@ #include <private/qtessellator_p.h> #include "math.h" +#include <QtCore/QDebug> class TestTessellator : public QTessellator { @@ -91,7 +92,8 @@ void test_tessellate_polygon_rect(QVector<XTrapezoid> *traps, const QPointF *poi bool winding) { // 5 points per rect - Q_ASSERT(nPoints % 5 == 0); + if (nPoints % 5 != 0) + qWarning() << Q_FUNC_INFO << "multiples of 5 points expected"; TestTessellator t; t.traps = traps; |