Skip to content
Permalink
Browse files

Fix build

  • Loading branch information
nyalldawson committed Jan 22, 2019
1 parent 85a6b1a commit cccd9766c224060558222bbe7a2217adbe0a487c
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/src/core/testqgsmapsettings.cpp
@@ -392,12 +392,12 @@ void TestQgsMapSettings::testExpressionContext()

QgsExpression e( QStringLiteral( "@map_scale" ) );
r = e.evaluate( &c );
QGSCOMPARENEAR( r.toDouble(), 247990, 10 );
QGSCOMPARENEAR( r.toDouble(), 247990, 10.0 );

// The old $scale function should silently map to @map_scale, so that older projects work without change
e = QgsExpression( QStringLiteral( "$scale" ) );
r = e.evaluate( &c );
QGSCOMPARENEAR( r.toDouble(), 247990, 10 );
QGSCOMPARENEAR( r.toDouble(), 247990, 10.0 );

// no map settings scope -- $scale is meaningless
e = QgsExpression( QStringLiteral( "$scale" ) );
@@ -421,11 +421,11 @@ void TestQgsMapSettings::testExpressionContext()

e = QgsExpression( QStringLiteral( "@map_extent_width" ) );
r = e.evaluate( &c );
QCOMPARE( r.toDouble(), 3 );
QCOMPARE( r.toDouble(), 3.0 );

e = QgsExpression( QStringLiteral( "@map_extent_height" ) );
r = e.evaluate( &c );
QCOMPARE( r.toDouble(), 3 );
QCOMPARE( r.toDouble(), 3.0 );

e = QgsExpression( QStringLiteral( "geom_to_wkt( @map_extent_center )" ) );
r = e.evaluate( &c );

0 comments on commit cccd976

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