Skip to content

Commit

Permalink
Add tests for expression scale function
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Sep 4, 2012
1 parent 9286429 commit 141c38d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/src/core/testqgsexpression.cpp
Expand Up @@ -410,6 +410,17 @@ class TestQgsExpression: public QObject
QCOMPARE( v2.toInt(), 101 );
}

void eval_scale()
{
QgsExpression exp( "$scale" );
QVariant v1 = exp.evaluate();
QCOMPARE( v1.toInt(), 0 );

exp.setScale( 100.00 );
QVariant v2 = exp.evaluate();
QCOMPARE( v2.toDouble(), 100.00 );
}

void eval_feature_id()
{
QgsFeature f( 100 );
Expand Down

0 comments on commit 141c38d

Please sign in to comment.