Skip to content
Permalink
Browse files

add multilinestring tesst

  • Loading branch information
lbartoletti committed Aug 25, 2020
1 parent 59aab9d commit 449d78bbffd0cfcecb35b8bd3282c905dbb84e87
Showing with 14 additions and 0 deletions.
  1. +14 −0 tests/src/core/testqgsgeometry.cpp
QCOMPARE( mpoly.asWkt(), QStringLiteral( "MultiPolygon EMPTY" ) );
QVERIFY( mpoly.fromWkt( "MultiPolygon EMPTY" ) );
QCOMPARE( mpoly.asWkt(), QStringLiteral( "MultiPolygon EMPTY" ) );

// multilinestring
QgsMultiLineString mline;
QVERIFY( ! mline.fromWkt( "MultiLineString((LineString( 0 0, 1 1, 2 2))" ) );
QVERIFY( mline.fromWkt( "MultiLineString(LineString(( 0 0, 1 1, 2 2)))" ) );
QCOMPARE( mline.asWkt(), QStringLiteral( "MultiLineString ((0 0, 1 1, 2 2))" ) );
QVERIFY( mline.fromWkt( "MultiLineString(LineString(( 0 0, 1 1, 2 2)))" ) );
QCOMPARE( mline.asWkt(), QStringLiteral( "MultiLineString ((0 0, 1 1, 2 2))" ) );
QVERIFY( mline.fromWkt( "MultiLineString(LineString(( 0 0, 1 1, 2 2)), LineString((2 2, 3 3, 3 2)))" ) );
QCOMPARE( mline.asWkt(), QStringLiteral( "MultiLineString ((0 0, 1 1, 2 2),(2 2, 3 3, 3 2))" ) );
QVERIFY( mline.fromWkt( "MultiLineString ( )" ) );
QCOMPARE( mline.asWkt(), QStringLiteral( "MultiLineString EMPTY" ) );
QVERIFY( mline.fromWkt( "MultiLineString EMPTY" ) );
QCOMPARE( mline.asWkt(), QStringLiteral( "MultiLineString EMPTY" ) );
}
QGSTEST_MAIN( TestQgsGeometry )
#include "testqgsgeometry.moc"

0 comments on commit 449d78b

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