Skip to content
Permalink
Browse files

Fix build

  • Loading branch information
nyalldawson committed Jan 24, 2019
1 parent 6f9d544 commit e6368a4b5b3197cd494553efddd2db57160715bd
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/src/core/testqgsmapsettings.cpp
@@ -382,12 +382,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" ) );
@@ -411,11 +411,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 e6368a4

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