Skip to content

Commit

Permalink
adapted test to addFeature new check geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
luipir committed Sep 26, 2017
1 parent c33ae01 commit 101c5cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/src/core/testqgstracer.cpp
Expand Up @@ -59,9 +59,9 @@ static QgsFeature make_feature( const QString& wkt )
return f;
}

static QgsVectorLayer* make_layer( const QStringList& wkts )
static QgsVectorLayer* make_layer( const QStringList& wkts, const QString& type = "LineString" )
{
QgsVectorLayer* vl = new QgsVectorLayer( "LineString", "x", "memory" );
QgsVectorLayer* vl = new QgsVectorLayer( type, "x", "memory" );
Q_ASSERT( vl->isValid() );

vl->startEditing();
Expand Down Expand Up @@ -163,7 +163,7 @@ void TestQgsTracer::testPolygon()
QStringList wkts;
wkts << "POLYGON((0 0, 0 10, 20 10, 10 0, 0 0))";

QgsVectorLayer* vl = make_layer( wkts );
QgsVectorLayer* vl = make_layer( wkts, "Polygon" );

QgsTracer tracer;
tracer.setLayers( QList<QgsVectorLayer*>() << vl );
Expand Down

0 comments on commit 101c5cc

Please sign in to comment.