Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Try to make raster calc test more reliable
  • Loading branch information
nyalldawson committed Jul 13, 2015
1 parent c6f7873 commit 63e1850
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/src/analysis/testqgsrastercalculator.cpp
Expand Up @@ -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
Expand All @@ -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;

Expand All @@ -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;
}
Expand Down

0 comments on commit 63e1850

Please sign in to comment.