Skip to content
Permalink
Browse files

Fix comment about precision loss

Thanks Even for helping with this
  • Loading branch information
strk committed Jun 22, 2016
1 parent 0a83f18 commit b040410c5e321bfe15e7c35e29f62dbabb55bec8
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.234568" ) ); // 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.234568" ) ); // in .asc file : 1.2345678901234
}

0 comments on commit b040410

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