Skip to content
Permalink
Browse files

Use QGSCOMPARENEAR macro in tracer test

  • Loading branch information
wonder-sk committed Jul 5, 2016
1 parent 1cb4adc commit cdf82a26401134c7b473b2bb5a92d4cf00d6cb11
Showing with 3 additions and 2 deletions.
  1. +3 −2 tests/src/core/testqgstracer.cpp
@@ -18,6 +18,7 @@
#include <qgsapplication.h>
#include <qgsgeometry.h>
#include <qgsmaplayerregistry.h>
#include <qgstestutils.h>
#include <qgstracer.h>
#include <qgsvectorlayer.h>

@@ -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 ) );

0 comments on commit cdf82a2

Please sign in to comment.
You can’t perform that action at this time.