Skip to content
Permalink
Browse files

Fix comment for precision loss

  • Loading branch information
strk committed Jun 22, 2016
1 parent 78881d6 commit f8750a618d805fe29d46b122304c9d7b49f42fa6
Showing with 4 additions and 2 deletions.
  1. +4 −2 tests/src/app/testqgsmaptoolidentifyaction.cpp
@@ -312,7 +312,8 @@ void TestQgsMapToolIdentifyAction::identifyRasterFloat32()

QCOMPARE( testIdentifyRaster( tempLayer.data(), 1.5, 0.5 ), QString( "-999.987" ) );

// More than 6 significant digits : precision loss in Float32
// More than 6 significant digits for corresponding value in .asc:
// precision loss in Float32
QCOMPARE( testIdentifyRaster( tempLayer.data(), 2.5, 0.5 ), QString( "1.2345678" ) ); // in .asc file : 1.2345678

QCOMPARE( testIdentifyRaster( tempLayer.data(), 3.5, 0.5 ), QString( "123456" ) );
@@ -323,7 +324,8 @@ void TestQgsMapToolIdentifyAction::identifyRasterFloat32()
// More than 6 significant digits: no precision loss here for that particular value
QCOMPARE( testIdentifyRaster( tempLayer.data(), 5.5, 0.5 ), QString( "-999.9876" ) );

// More than 6 significant digits: no precision loss here
// More than 6 significant digits for corresponding value in .asc:
// precision loss in Float32
QCOMPARE( testIdentifyRaster( tempLayer.data(), 6.5, 0.5 ), QString( "1.2345678901234" ) ); // in .asc file : 1.2345678901234
}

0 comments on commit f8750a6

Please sign in to comment.
You can’t perform that action at this time.