Skip to content
Permalink
Browse files

added a few more log expression tests

  • Loading branch information
lynxlynxlynx committed Sep 28, 2012
1 parent c63ab9a commit 01a27bab89d7fa857e333cd0af4f886c2881785e
Showing with 3 additions and 0 deletions.
  1. +3 −0 tests/src/core/testqgsexpression.cpp
@@ -246,6 +246,9 @@ class TestQgsExpression: public QObject
QTest::newRow( "log10(100)" ) << "log10(100)" << false << QVariant( 2. );
QTest::newRow( "log(2,32)" ) << "log(2,32)" << false << QVariant( 5. );
QTest::newRow( "log(10,1000)" ) << "log(10,1000)" << false << QVariant( 3. );
QTest::newRow( "log(-2,32)" ) << "log(-2,32)" << false << QVariant( );
QTest::newRow( "log(2,-32)" ) << "log(2,-32)" << false << QVariant( );
QTest::newRow( "log(0.5,32)" ) << "log(0.5,32)" << false << QVariant( -5. );
QTest::newRow( "round(1234.557,2) - round up" ) << "round(1234.557,2)" << false << QVariant( 1234.56 );
QTest::newRow( "round(1234.554,2) - round down" ) << "round(1234.554,2)" << false << QVariant( 1234.55 );
QTest::newRow( "round(1234.6) - round up to int" ) << "round(1234.6)" << false << QVariant( 1235 );

0 comments on commit 01a27ba

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