Skip to content

Commit e6368a4

Browse files
committed
Fix build
1 parent 6f9d544 commit e6368a4

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/src/core/testqgsmapsettings.cpp

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

383383
QgsExpression e( QStringLiteral( "@map_scale" ) );
384384
r = e.evaluate( &c );
385-
QGSCOMPARENEAR( r.toDouble(), 247990, 10 );
385+
QGSCOMPARENEAR( r.toDouble(), 247990, 10.0 );
386386

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

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

412412
e = QgsExpression( QStringLiteral( "@map_extent_width" ) );
413413
r = e.evaluate( &c );
414-
QCOMPARE( r.toDouble(), 3 );
414+
QCOMPARE( r.toDouble(), 3.0 );
415415

416416
e = QgsExpression( QStringLiteral( "@map_extent_height" ) );
417417
r = e.evaluate( &c );
418-
QCOMPARE( r.toDouble(), 3 );
418+
QCOMPARE( r.toDouble(), 3.0 );
419419

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

0 commit comments

Comments
 (0)