Skip to content
Permalink
Browse files

Add tests for expression scale function

  • Loading branch information
NathanW2 committed Sep 4, 2012
1 parent 9286429 commit 141c38d377c592019114fa29f9adb21dc00a9754
Showing with 11 additions and 0 deletions.
  1. +11 −0 tests/src/core/testqgsexpression.cpp
@@ -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 );

0 comments on commit 141c38d

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