Skip to content
Permalink
Browse files

Fix qgsrasterlayer tests under GDAL >= 2.0

  • Loading branch information
nyalldawson committed Mar 31, 2016
1 parent fdfdadc commit d3eb6cefdec0cc55084dcc796086a9c650fab3f7
Showing with 2 additions and 3 deletions.
  1. +2 −3 tests/src/core/testqgsrasterlayer.cpp
@@ -372,12 +372,11 @@ void TestQgsRasterLayer::checkStats()
//QVERIFY( myStatistics.elementCount == 100 );
QVERIFY( myStatistics.minimumValue == 0 );
QVERIFY( myStatistics.maximumValue == 9 );
QVERIFY( myStatistics.mean == 4.5 );
QVERIFY( qgsDoubleNear( myStatistics.mean, 4.5 ) );
double stdDev = 2.87228132326901431;
// TODO: verify why GDAL stdDev is so different from generic (2.88675)
mReport += QString( "stdDev = %1 expected = %2<br>\n" ).arg( myStatistics.stdDev ).arg( stdDev );
QVERIFY( fabs( myStatistics.stdDev - stdDev )
< 0.0000000000000001 );
QVERIFY( qgsDoubleNear( myStatistics.stdDev, stdDev, 0.00000000000001 ) );
mReport += "<p>Passed</p>";
}

0 comments on commit d3eb6ce

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