Skip to content

Commit

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

0 comments on commit e6368a4

Please sign in to comment.