Skip to content

Commit

Permalink
add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
Koyaani committed Nov 25, 2021
1 parent da952ca commit 33625f9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/src/core/geometry/testqgsmultilinestring.cpp
Expand Up @@ -205,10 +205,17 @@ void TestQgsMultiLineString::addGeometryInitialDimension()
QCOMPARE( ls->pointN( 0 ), QgsPoint( 9, 12 ) );
QCOMPARE( ls->pointN( 1 ), QgsPoint( 3, 13 ) );

ls = static_cast< const QgsLineString * >( mls.geometryN( 1 ) );
// test lineStringN by the same occasion
QCOMPARE( static_cast< const QgsLineString * >( mls.lineStringN( 0 ) ),
static_cast< const QgsLineString * >( mls.geometryN( 0 ) ) );

ls = static_cast< const QgsLineString * >( mls.lineStringN( 1 ) );
QCOMPARE( ls->pointN( 0 ), QgsPoint( 1, 10 ) );
QCOMPARE( ls->pointN( 1 ), QgsPoint( 2, 11 ) );

QCOMPARE( static_cast< const QgsLineString * >( mls.lineStringN( 1 ) ),
static_cast< const QgsLineString * >( mls.geometryN( 1 ) ) );

part.setPoints( QgsPointSequence() << QgsPoint( QgsWkbTypes::PointM, 21, 30, 0, 2 )
<< QgsPoint( QgsWkbTypes::PointM, 32, 41, 0, 3 ) ) ;
mls.addGeometry( part.clone() );
Expand Down

0 comments on commit 33625f9

Please sign in to comment.