Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix build
  • Loading branch information
lbartoletti committed Mar 5, 2020
1 parent 1a45610 commit 6dcf392
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/src/app/testqgsmaptooladdfeatureline.cpp
Expand Up @@ -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() );
}
}
Expand All @@ -68,6 +68,7 @@ class TestQgsMapToolAddFeatureLine : public QObject
void testZ();
void testZMSnapping();
void testTopologicalEditingZ();
void testCloseLine();

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

Expand Down Expand Up @@ -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 ) );
Expand Down

0 comments on commit 6dcf392

Please sign in to comment.