Skip to content
Permalink
Browse files

Try to make raster calc test more reliable

  • Loading branch information
nyalldawson committed Jul 13, 2015
1 parent c6f7873 commit 63e18501a5e036f137ee8f7279718a17c1541c1d
Showing with 8 additions and 8 deletions.
  1. +8 −8 tests/src/analysis/testqgsrastercalculator.cpp
@@ -431,7 +431,7 @@ void TestQgsRasterCalculator::calcWithLayers()

QgsCoordinateReferenceSystem crs;
crs.createFromId( 32633, QgsCoordinateReferenceSystem::EpsgCrsId );
QgsRectangle extent( 783270, 3348110, 783370, 3347910 );
QgsRectangle extent( 783235, 3348110, 783350, 3347960 );

QTemporaryFile tmpFile;
tmpFile.open(); // fileName is no avialable until open
@@ -451,10 +451,10 @@ void TestQgsRasterCalculator::calcWithLayers()
QgsRasterBlock* block = result->dataProvider()->block( 1, extent, 2, 3 );
QCOMPARE( block->value( 0, 0 ), 127.0 );
QCOMPARE( block->value( 0, 1 ), 127.0 );
QCOMPARE( block->value( 1, 0 ), 127.0 );
QCOMPARE( block->value( 1, 1 ), 126.0 );
QCOMPARE( block->value( 2, 0 ), 128.0 );
QCOMPARE( block->value( 2, 1 ), 129.0 );
QCOMPARE( block->value( 1, 0 ), 126.0 );
QCOMPARE( block->value( 1, 1 ), 127.0 );
QCOMPARE( block->value( 2, 0 ), 127.0 );
QCOMPARE( block->value( 2, 1 ), 126.0 );
delete result;
delete block;

@@ -472,10 +472,10 @@ void TestQgsRasterCalculator::calcWithLayers()
block = result->dataProvider()->block( 1, extent, 2, 3 );
QCOMPARE( block->value( 0, 0 ), 265.0 );
QCOMPARE( block->value( 0, 1 ), 263.0 );
QCOMPARE( block->value( 1, 0 ), 266.0 );
QCOMPARE( block->value( 1, 1 ), 261.0 );
QCOMPARE( block->value( 1, 0 ), 263.0 );
QCOMPARE( block->value( 1, 1 ), 264.0 );
QCOMPARE( block->value( 2, 0 ), 266.0 );
QCOMPARE( block->value( 2, 1 ), 268.0 );
QCOMPARE( block->value( 2, 1 ), 261.0 );
delete result;
delete block;
}

0 comments on commit 63e1850

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