Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix build
  • Loading branch information
nyalldawson committed Jan 22, 2019
1 parent 85a6b1a commit cccd976
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/src/core/testqgsmapsettings.cpp
Expand Up @@ -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" ) );
Expand All @@ -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 );
Expand Down

0 comments on commit cccd976

Please sign in to comment.