Skip to content
Permalink
Browse files
fix tests with geos 3.8 and 3.9
  • Loading branch information
lbartoletti committed May 17, 2021
1 parent 09f75ec commit 80e3a9444d1449f2fe10dc09ada06a8a9f4bf0ed
Showing with 9 additions and 1 deletion.
  1. +9 −1 tests/src/app/testqgsvertextool.cpp
@@ -17,6 +17,7 @@

#include "qgsadvanceddigitizingdockwidget.h"
#include "qgsgeometry.h"
#include "qgsgeos.h"
#include "qgsmapcanvas.h"
#include "qgsmapcanvassnappingutils.h"
#include "qgsproject.h"
@@ -1088,7 +1089,14 @@ void TestQgsVertexTool::testAvoidIntersections()
mouseClick( 5, 15, Qt::LeftButton );
mouseClick( 12.5, 15, Qt::LeftButton );

QCOMPARE( mLayerPolygon->getFeature( mFidPolygonF_topo1 ).geometry().asWkt( 1 ), "Polygon ((0 20, 10.7 15.7, 10 15, 10.7 14.3, 0 10, 0 20))" );
if ( GEOS_VERSION_MAJOR == 3 && GEOS_VERSION_MINOR < 9 )
{
QCOMPARE( mLayerPolygon->getFeature( mFidPolygonF_topo1 ).geometry().asWkt( 1 ), "Polygon ((0 10, 0 20, 10.7 15.7, 10 15, 10.7 14.3, 0 10))" );
}
else
{
QCOMPARE( mLayerPolygon->getFeature( mFidPolygonF_topo1 ).geometry().asWkt( 1 ), "Polygon ((0 20, 10.7 15.7, 10 15, 10.7 14.3, 0 10, 0 20))" );
}
QCOMPARE( mLayerPolygon->getFeature( mFidPolygonF_topo2 ).geometry().asWkt( 1 ), "Polygon ((10 15, 10.7 14.3, 15 10, 15 20, 10.7 15.7, 10 15))" );

mLayerPolygon->undoStack()->undo(); // undo topological points

0 comments on commit 80e3a94

Please sign in to comment.