Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix tests with geos 3.8 and 3.9
  • Loading branch information
lbartoletti committed May 17, 2021
1 parent 09f75ec commit 80e3a94
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/src/app/testqgsvertextool.cpp
Expand Up @@ -17,6 +17,7 @@

#include "qgsadvanceddigitizingdockwidget.h"
#include "qgsgeometry.h"
#include "qgsgeos.h"
#include "qgsmapcanvas.h"
#include "qgsmapcanvassnappingutils.h"
#include "qgsproject.h"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 80e3a94

Please sign in to comment.