Skip to content

Commit 01a27ba

Browse files
committed
added a few more log expression tests
1 parent c63ab9a commit 01a27ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/src/core/testqgsexpression.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,9 @@ class TestQgsExpression: public QObject
246246
QTest::newRow( "log10(100)" ) << "log10(100)" << false << QVariant( 2. );
247247
QTest::newRow( "log(2,32)" ) << "log(2,32)" << false << QVariant( 5. );
248248
QTest::newRow( "log(10,1000)" ) << "log(10,1000)" << false << QVariant( 3. );
249+
QTest::newRow( "log(-2,32)" ) << "log(-2,32)" << false << QVariant( );
250+
QTest::newRow( "log(2,-32)" ) << "log(2,-32)" << false << QVariant( );
251+
QTest::newRow( "log(0.5,32)" ) << "log(0.5,32)" << false << QVariant( -5. );
249252
QTest::newRow( "round(1234.557,2) - round up" ) << "round(1234.557,2)" << false << QVariant( 1234.56 );
250253
QTest::newRow( "round(1234.554,2) - round down" ) << "round(1234.554,2)" << false << QVariant( 1234.55 );
251254
QTest::newRow( "round(1234.6) - round up to int" ) << "round(1234.6)" << false << QVariant( 1235 );

0 commit comments

Comments
 (0)