Skip to content

Commit cdf82a2

Browse files
committedJul 5, 2016
Use QGSCOMPARENEAR macro in tracer test
1 parent 1cb4adc commit cdf82a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎tests/src/core/testqgstracer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include <qgsapplication.h>
1919
#include <qgsgeometry.h>
2020
#include <qgsmaplayerregistry.h>
21+
#include <qgstestutils.h>
2122
#include <qgstracer.h>
2223
#include <qgsvectorlayer.h>
2324

@@ -344,9 +345,9 @@ void TestQgsTracer::testCurved()
344345
double l = tmpG1->length();
345346
delete tmpG1;
346347

347-
// fuzzy comparison of QCOMPARE is too strict for this case
348+
// fuzzy comparison as QCOMPARE is too strict for this case
348349
double full_circle_length = 2 * M_PI * 10;
349-
QVERIFY( qAbs( l - full_circle_length / 4 ) < 0.01 );
350+
QGSCOMPARENEAR( l, full_circle_length / 4, 0.01 );
350351

351352
QCOMPARE( points1[0], QgsPoint( 0, 0 ) );
352353
QCOMPARE( points1[points1.count()-1], QgsPoint( 10, 10 ) );

0 commit comments

Comments
 (0)
Please sign in to comment.