Skip to content
Permalink
Browse files
add a test
  • Loading branch information
Koyaani committed Nov 25, 2021
1 parent da952ca commit 33625f9b93f1a117fa0b3da4a76548a4156a8412
Showing with 8 additions and 1 deletion.
  1. +8 −1 tests/src/core/geometry/testqgsmultilinestring.cpp
@@ -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() );

0 comments on commit 33625f9

Please sign in to comment.