Skip to content
Permalink
Browse files

[Geometry checker] Finish gap check test

  • Loading branch information
manisandro committed Oct 12, 2017
1 parent 6b3309c commit c44fa1da5cf2a8b5fbc0cc6f3f682dfa6f8fc94d
@@ -26,6 +26,7 @@
#include "qgsgeometrydegeneratepolygoncheck.h"
#include "qgsgeometryduplicatecheck.h"
#include "qgsgeometryduplicatenodescheck.h"
#include "qgsgeometrygapcheck.h"
#include "qgsgeometryholecheck.h"
#include "qgsgeometrylineintersectioncheck.h"
#include "qgsgeometrylinelayerintersectioncheck.h"
@@ -38,7 +39,6 @@
#include "qgsgeometryselfintersectioncheck.h"
#include "qgsgeometrysliverpolygoncheck.h"

#include "qgsgeometrygapcheck.h"
#include "qgsgeometrytypecheck.h"


@@ -230,9 +230,16 @@ void TestQgsGeometryChecks::testGapCheck()
QList<QgsGeometryCheckError *> checkErrors;
QStringList messages;

QgsGeometryGapCheck( context, 0.001 ).collectErrors( checkErrors, messages );
QgsGeometryGapCheck( context, 0.01 ).collectErrors( checkErrors, messages );
listErrors( checkErrors, messages );

QCOMPARE( checkErrors.size(), 5 );
QVERIFY( searchCheckError( checkErrors, "", -1, QgsPointXY( 0.2924, -0.8798 ), QgsVertexId(), 0.0027 ) == 1 );
QVERIFY( searchCheckError( checkErrors, "", -1, QgsPointXY( 0.4238, -0.7479 ), QgsVertexId(), 0.0071 ) == 1 );
QVERIFY( searchCheckError( checkErrors, "", -1, QgsPointXY( 0.0094, -0.4448 ), QgsVertexId(), 0.0033 ) == 1 );
QVERIFY( searchCheckError( checkErrors, "", -1, QgsPointXY( 0.2939, -0.4694 ), QgsVertexId(), 0.0053 ) == 1 );
QVERIFY( searchCheckError( checkErrors, "", -1, QgsPointXY( 0.6284, -0.3641 ), QgsVertexId(), 0.0018 ) == 1 );

cleanupTestContext( context );
}

Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit c44fa1d

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