Skip to content

Commit

Permalink
Fix build on 32-bits archs using LL for large constants
Browse files Browse the repository at this point in the history
  • Loading branch information
landryb authored and m-kuhn committed Nov 2, 2015
1 parent c445ac1 commit 03eaafe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/src/core/testqgsdistancearea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,20 +203,20 @@ void TestQgsDistanceArea::collections()

//collection of polygons
QgsGeometry polys( QgsGeometryFactory::geomFromWkt( "GeometryCollection( Polygon((0 36.53, 5.76 -48.16, 0 25.54, 0 36.53)), Polygon((10 20, 15 20, 15 10, 10 20)) )" ) );
result = myDa.measure( &polys ); //should meaure area
QVERIFY( qgsDoubleNear( result, 670434859475, 1 ) );
result = myDa.measure( &polys ); //should measure area
QVERIFY( qgsDoubleNear( result, 670434859475LL, 1 ) );
result = myDa.measureArea( &polys );
QVERIFY( qgsDoubleNear( result, 670434859475, 1 ) );
QVERIFY( qgsDoubleNear( result, 670434859475LL, 1 ) );
result = myDa.measureLength( &polys );
QVERIFY( qgsDoubleNear( result, 0 ) );

//mixed collection
QgsGeometry mixed( QgsGeometryFactory::geomFromWkt( "GeometryCollection( LineString(0 36.53, 5.76 -48.16), LineString(0 25.54, 24.20 36.70), Polygon((0 36.53, 5.76 -48.16, 0 25.54, 0 36.53)), Polygon((10 20, 15 20, 15 10, 10 20)) )" ) );
result = myDa.measure( &mixed ); //should measure area
QVERIFY( qgsDoubleNear( result, 670434859475, 1 ) );
QVERIFY( qgsDoubleNear( result, 670434859475LL, 1 ) );
//measure area specifically
result = myDa.measureArea( &mixed );
QVERIFY( qgsDoubleNear( result, 670434859475, 1 ) );
QVERIFY( qgsDoubleNear( result, 670434859475LL, 1 ) );
//measure length
result = myDa.measureLength( &mixed );
QVERIFY( qgsDoubleNear( result, 12006159, 1 ) );
Expand Down

0 comments on commit 03eaafe

Please sign in to comment.