Skip to content

Commit 101c5cc

Browse files
committedSep 26, 2017
adapted test to addFeature new check geometry
1 parent c33ae01 commit 101c5cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎tests/src/core/testqgstracer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ static QgsFeature make_feature( const QString& wkt )
5959
return f;
6060
}
6161

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

6767
vl->startEditing();
@@ -163,7 +163,7 @@ void TestQgsTracer::testPolygon()
163163
QStringList wkts;
164164
wkts << "POLYGON((0 0, 0 10, 20 10, 10 0, 0 0))";
165165

166-
QgsVectorLayer* vl = make_layer( wkts );
166+
QgsVectorLayer* vl = make_layer( wkts, "Polygon" );
167167

168168
QgsTracer tracer;
169169
tracer.setLayers( QList<QgsVectorLayer*>() << vl );

0 commit comments

Comments
 (0)
Please sign in to comment.