Skip to content
Permalink
Browse files

fix build

  • Loading branch information
lbartoletti committed Mar 5, 2020
1 parent 1a45610 commit 6dcf3927bf6e652c7dabb2ea5f82e00b44c6a846
Showing with 8 additions and 1 deletion.
  1. +8 −1 tests/src/app/testqgsmaptooladdfeatureline.cpp
@@ -42,7 +42,7 @@ namespace QTest
// pretty printing of geometries in comparison tests
template<> char *toString( const QgsGeometry &geom )
{
QByteArray ba = geom.asWkt().toAscii();
QByteArray ba = geom.asWkt().toLatin1();
return qstrdup( ba.data() );
}
}
@@ -68,6 +68,7 @@ class TestQgsMapToolAddFeatureLine : public QObject
void testZ();
void testZMSnapping();
void testTopologicalEditingZ();
void testCloseLine();

private:
QgisApp *mQgisApp = nullptr;
@@ -80,6 +81,7 @@ class TestQgsMapToolAddFeatureLine : public QObject
QgsVectorLayer *mLayerPointZM = nullptr;
QgsVectorLayer *mLayerTopoZ = nullptr;
QgsVectorLayer *mLayerLine2D = nullptr;
QgsVectorLayer *mLayerCloseLine = nullptr;
QgsFeatureId mFidLineF1 = 0;
};

@@ -137,6 +139,11 @@ void TestQgsMapToolAddFeatureLine::initTestCase()
mLayerLineZ->addFeature( lineF2 );
QCOMPARE( mLayerLineZ->featureCount(), ( long )1 );

mLayerCloseLine = new QgsVectorLayer( QStringLiteral( "LineString?crs=EPSG:27700" ), QStringLiteral( "layer line Closed" ), QStringLiteral( "memory" ) );
QVERIFY( mLayerCloseLine->isValid() );
mLayerCloseLine->startEditing();
QgsProject::instance()->addMapLayers( QList<QgsMapLayer *>() << mLayerCloseLine );

mCanvas->setFrameStyle( QFrame::NoFrame );
mCanvas->resize( 512, 512 );
mCanvas->setExtent( QgsRectangle( 0, 0, 8, 8 ) );

0 comments on commit 6dcf392

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