Skip to content

Commit

Permalink
Update tests/src/core/testqgsexpression.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
  • Loading branch information
2 people authored and nyalldawson committed Jul 28, 2021
1 parent 638e9a2 commit 62ff7df
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/src/core/testqgsexpression.cpp
Expand Up @@ -1318,10 +1318,10 @@ class TestQgsExpression: public QObject
QTest::newRow( "main angle null" ) << "main_angle(NULL)" << false << QVariant();
QTest::newRow( "sinuosity not geom" ) << "sinuosity('g')" << true << QVariant();
QTest::newRow( "sinuosity null" ) << "sinuosity(NULL)" << false << QVariant();
QTest::newRow( "sinuosity point" ) << "sinuosity(geom_from_wkt('POINT(1 2)'))" << true << QVariant( );
QTest::newRow( "sinuosity multi linestring" ) << "sinuosity(geom_from_wkt('MULTILINESTRING( (0 0, 1 1), (2 2, 3 3) )'))" << true << QVariant( );
QTest::newRow( "sinuosity linestring" ) << "round(sinuosity(geom_from_wkt(' LINESTRING(2 0, 2 2, 3 2, 3 3)')), 3)" << false << QVariant( 1.265 );
QTest::newRow( "sinuosity linestring" ) << "sinuosity(geom_from_wkt(' LINESTRING( 3 1, 5 1) '))" << false << QVariant( 1.0 );
QTest::newRow( "sinuosity point" ) << "sinuosity(geom_from_wkt('POINT(1 2)'))" << true << QVariant();
QTest::newRow( "sinuosity multi linestring" ) << "sinuosity(geom_from_wkt('MULTILINESTRING( (0 0, 1 1), (2 2, 3 3) )'))" << true << QVariant();
QTest::newRow( "sinuosity linestring" ) << "round(sinuosity(geom_from_wkt('LINESTRING(2 0, 2 2, 3 2, 3 3)')), 3)" << false << QVariant( 1.265 );
QTest::newRow( "sinuosity linestring" ) << "sinuosity(geom_from_wkt('LINESTRING( 3 1, 5 1)'))" << false << QVariant( 1.0 );

// string functions
QTest::newRow( "format_number" ) << "format_number(1999.567,2)" << false << QVariant( "1,999.57" );
Expand Down

0 comments on commit 62ff7df

Please sign in to comment.