Skip to content

Commit

Permalink
Fix geometries in maptoolmovefeature tests
Browse files Browse the repository at this point in the history
  • Loading branch information
uclaros authored and nyalldawson committed Mar 29, 2021
1 parent d369236 commit f488a6c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/src/app/testqgsmaptoolmovefeature.cpp
Expand Up @@ -88,10 +88,10 @@ void TestQgsMapToolMoveFeature::initTestCase()
QgsProject::instance()->addMapLayers( QList<QgsMapLayer *>() << mLayerBase );

mLayerBase->startEditing();
QString wkt1 = "Polygon ((0 0, 0 1, 1 1, 1 0))";
QString wkt1 = "Polygon ((0 0, 0 1, 1 1, 1 0, 0 0))";
QgsFeature f1;
f1.setGeometry( QgsGeometry::fromWkt( wkt1 ) );
QString wkt2 = "Polygon ((2 0, 2 5, 3 5, 3 0))";
QString wkt2 = "Polygon ((2 0, 2 5, 3 5, 3 0, 2 0))";
QgsFeature f2;
f2.setGeometry( QgsGeometry::fromWkt( wkt2 ) );

Expand Down Expand Up @@ -135,9 +135,9 @@ void TestQgsMapToolMoveFeature::testMoveFeature()
utils.mouseClick( 1, 1, Qt::LeftButton, Qt::KeyboardModifiers(), true );
utils.mouseClick( 2, 1, Qt::LeftButton, Qt::KeyboardModifiers(), true );

QString wkt1 = "Polygon ((1 0, 1 1, 2 1, 2 0))";
QString wkt1 = "Polygon ((1 0, 1 1, 2 1, 2 0, 1 0))";
QCOMPARE( mLayerBase->getFeature( 1 ).geometry().asWkt(), wkt1 );
QString wkt2 = "Polygon ((2 0, 2 5, 3 5, 3 0))";
QString wkt2 = "Polygon ((2 0, 2 5, 3 5, 3 0, 2 0))";
QCOMPARE( mLayerBase->getFeature( 2 ).geometry().asWkt(), wkt2 );

mLayerBase->undoStack()->undo();
Expand All @@ -153,9 +153,9 @@ void TestQgsMapToolMoveFeature::testTopologicalMoveFeature()
utils.mouseClick( 1, 1, Qt::LeftButton, Qt::KeyboardModifiers(), true );
utils.mouseClick( 2, 1, Qt::LeftButton, Qt::KeyboardModifiers(), true );

QString wkt1 = "Polygon ((1 0, 1 1, 2 1, 2 0))";
QString wkt1 = "Polygon ((1 0, 1 1, 2 1, 2 0, 1 0))";
QCOMPARE( mLayerBase->getFeature( 1 ).geometry().asWkt(), wkt1 );
QString wkt2 = "Polygon ((2 0, 2 1, 2 5, 3 5, 3 0))";
QString wkt2 = "Polygon ((2 0, 2 1, 2 5, 3 5, 3 0, 2 0))";
QCOMPARE( mLayerBase->getFeature( 2 ).geometry().asWkt(), wkt2 );

mLayerBase->undoStack()->undo();
Expand Down

0 comments on commit f488a6c

Please sign in to comment.