Skip to content
Permalink
Browse files

Fix leak in test

  • Loading branch information
nyalldawson committed Jun 2, 2016
1 parent c672ce2 commit 7af33661eb2df31b09eb05d7c6d967533ca83354
Showing with 5 additions and 0 deletions.
  1. +5 −0 tests/src/core/testqgscomposition.cpp
@@ -536,6 +536,7 @@ void TestQgsComposition::georeference()
QVERIFY( qgsDoubleNear( t[3], 3200, 1 ) );
QVERIFY( qgsDoubleNear( t[4], 0.0 ) );
QVERIFY( qgsDoubleNear( t[5], -0.211694, 0.0001 ) );
delete[] t;

// don't specify map
composition->setWorldFileMap( map );
@@ -546,6 +547,7 @@ void TestQgsComposition::georeference()
QVERIFY( qgsDoubleNear( t[3], 3200, 1 ) );
QVERIFY( qgsDoubleNear( t[4], 0.0 ) );
QVERIFY( qgsDoubleNear( t[5], -0.211694, 0.0001 ) );
delete[] t;

// specify extent
t = composition->computeGeoTransform( map, QRectF( 70, 100, 50, 60 ) );
@@ -555,6 +557,7 @@ void TestQgsComposition::georeference()
QVERIFY( qgsDoubleNear( t[3], 2950, 1 ) );
QVERIFY( qgsDoubleNear( t[4], 0.0 ) );
QVERIFY( qgsDoubleNear( t[5], -0.211864, 0.0001 ) );
delete[] t;

// specify dpi
t = composition->computeGeoTransform( map, QRectF(), 75 );
@@ -564,6 +567,7 @@ void TestQgsComposition::georeference()
QVERIFY( qgsDoubleNear( t[3], 3200.0, 1 ) );
QVERIFY( qgsDoubleNear( t[4], 0.0 ) );
QVERIFY( qgsDoubleNear( t[5], -0.846774, 0.0001 ) );
delete[] t;

// rotation
map->setMapRotation( 45 );
@@ -574,6 +578,7 @@ void TestQgsComposition::georeference()
QVERIFY( qgsDoubleNear( t[3], 2889.64, 1 ) );
QVERIFY( qgsDoubleNear( t[4], 0.14969, 0.0001 ) );
QVERIFY( qgsDoubleNear( t[5], -0.14969, 0.0001 ) );
delete[] t;

delete composition;
}

0 comments on commit 7af3366

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