Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use QGSCOMPARENEAR macro in tracer test
  • Loading branch information
wonder-sk committed Jul 5, 2016
1 parent 1cb4adc commit cdf82a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/src/core/testqgstracer.cpp
Expand Up @@ -18,6 +18,7 @@
#include <qgsapplication.h>
#include <qgsgeometry.h>
#include <qgsmaplayerregistry.h>
#include <qgstestutils.h>
#include <qgstracer.h>
#include <qgsvectorlayer.h>

Expand Down Expand Up @@ -344,9 +345,9 @@ void TestQgsTracer::testCurved()
double l = tmpG1->length();
delete tmpG1;

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

QCOMPARE( points1[0], QgsPoint( 0, 0 ) );
QCOMPARE( points1[points1.count()-1], QgsPoint( 10, 10 ) );
Expand Down

0 comments on commit cdf82a2

Please sign in to comment.