Skip to content
Permalink
Browse files

adapted test to addFeature new check geometry

  • Loading branch information
luipir committed Sep 26, 2017
1 parent c33ae01 commit 101c5ccbf238653ce8049420555bd9065f40eddc
Showing with 3 additions and 3 deletions.
  1. +3 −3 tests/src/core/testqgstracer.cpp
@@ -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();
@@ -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 );

0 comments on commit 101c5cc

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