Skip to content

Commit c44fa1d

Browse files
committed
[Geometry checker] Finish gap check test
1 parent 6b3309c commit c44fa1d

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

tests/src/geometry_checker/testqgsgeometrychecks.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "qgsgeometrydegeneratepolygoncheck.h"
2727
#include "qgsgeometryduplicatecheck.h"
2828
#include "qgsgeometryduplicatenodescheck.h"
29+
#include "qgsgeometrygapcheck.h"
2930
#include "qgsgeometryholecheck.h"
3031
#include "qgsgeometrylineintersectioncheck.h"
3132
#include "qgsgeometrylinelayerintersectioncheck.h"
@@ -38,7 +39,6 @@
3839
#include "qgsgeometryselfintersectioncheck.h"
3940
#include "qgsgeometrysliverpolygoncheck.h"
4041

41-
#include "qgsgeometrygapcheck.h"
4242
#include "qgsgeometrytypecheck.h"
4343

4444

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

233-
QgsGeometryGapCheck( context, 0.001 ).collectErrors( checkErrors, messages );
233+
QgsGeometryGapCheck( context, 0.01 ).collectErrors( checkErrors, messages );
234234
listErrors( checkErrors, messages );
235235

236+
QCOMPARE( checkErrors.size(), 5 );
237+
QVERIFY( searchCheckError( checkErrors, "", -1, QgsPointXY( 0.2924, -0.8798 ), QgsVertexId(), 0.0027 ) == 1 );
238+
QVERIFY( searchCheckError( checkErrors, "", -1, QgsPointXY( 0.4238, -0.7479 ), QgsVertexId(), 0.0071 ) == 1 );
239+
QVERIFY( searchCheckError( checkErrors, "", -1, QgsPointXY( 0.0094, -0.4448 ), QgsVertexId(), 0.0033 ) == 1 );
240+
QVERIFY( searchCheckError( checkErrors, "", -1, QgsPointXY( 0.2939, -0.4694 ), QgsVertexId(), 0.0053 ) == 1 );
241+
QVERIFY( searchCheckError( checkErrors, "", -1, QgsPointXY( 0.6284, -0.3641 ), QgsVertexId(), 0.0018 ) == 1 );
242+
236243
cleanupTestContext( context );
237244
}
238245

11 Bytes
Binary file not shown.
152 Bytes
Binary file not shown.
8 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)