Skip to content

Commit cccd976

Browse files
committedJan 22, 2019
Fix build
1 parent 85a6b1a commit cccd976

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎tests/src/core/testqgsmapsettings.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,12 +392,12 @@ void TestQgsMapSettings::testExpressionContext()
392392

393393
QgsExpression e( QStringLiteral( "@map_scale" ) );
394394
r = e.evaluate( &c );
395-
QGSCOMPARENEAR( r.toDouble(), 247990, 10 );
395+
QGSCOMPARENEAR( r.toDouble(), 247990, 10.0 );
396396

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

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

422422
e = QgsExpression( QStringLiteral( "@map_extent_width" ) );
423423
r = e.evaluate( &c );
424-
QCOMPARE( r.toDouble(), 3 );
424+
QCOMPARE( r.toDouble(), 3.0 );
425425

426426
e = QgsExpression( QStringLiteral( "@map_extent_height" ) );
427427
r = e.evaluate( &c );
428-
QCOMPARE( r.toDouble(), 3 );
428+
QCOMPARE( r.toDouble(), 3.0 );
429429

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

0 commit comments

Comments
 (0)
Please sign in to comment.