Bug report #13730
2.12 build fails on 32-bit arch (testqgsdistancearea.cpp)
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | - | ||
Affected QGIS version: | 2.12.0 | Regression?: | No |
Operating System: | OpenBSD | Easy fix?: | No |
Pull Request or Patch supplied: | Yes | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 21757 |
Description
--- tests/src/core/testqgsdistancearea.cpp.orig Sun Nov 1 13:45:40 2015 +++ tests/src/core/testqgsdistancearea.cpp Sun Nov 1 13:46:13 2015 @@ -204,19 +204,19 @@ 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 ) ); + 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 ) );
History
#2 Updated by landry Landry Breuil about 9 years ago
- % Done changed from 0 to 100
- Target version set to Version 2.14
- Status changed from Open to Closed
PR merged in 03eaafe