Skip to content
Permalink
Browse files

Rebuild composer test images at 96 dpi to speed up unit tests

  • Loading branch information
nyalldawson committed Sep 21, 2014
1 parent 3766537 commit 3af68f4888278bf62cdda4666806c46b67e43d3e
Showing with 66 additions and 65 deletions.
  1. +12 −11 tests/src/core/qgscompositionchecker.cpp
  2. +9 −9 tests/src/core/testqgsatlascomposition.cpp
  3. +1 −1 tests/src/core/testqgscomposermap.cpp
  4. +20 −20 tests/src/core/testqgscomposermapgrid.cpp
  5. +6 −6 tests/src/core/testqgscomposermapoverview.cpp
  6. +1 −1 tests/src/core/testqgscomposerpaper.cpp
  7. +10 −10 tests/src/core/testqgscomposerpicture.cpp
  8. +2 −2 tests/src/core/testqgscomposerrotation.cpp
  9. +5 −5 tests/src/core/testqgscomposerscalebar.cpp
  10. BIN tests/testdata/control_images/expected_atlas_autoscale1/expected_atlas_autoscale1.png
  11. BIN tests/testdata/control_images/expected_atlas_autoscale2/expected_atlas_autoscale2.png
  12. BIN ...s/testdata/control_images/expected_atlas_autoscale_old_api1/expected_atlas_autoscale_old_api1.png
  13. BIN ...s/testdata/control_images/expected_atlas_autoscale_old_api2/expected_atlas_autoscale_old_api2.png
  14. BIN tests/testdata/control_images/expected_atlas_filtering1/expected_atlas_filtering1.png
  15. BIN tests/testdata/control_images/expected_atlas_fixedscale1/expected_atlas_fixedscale1.png
  16. BIN tests/testdata/control_images/expected_atlas_fixedscale2/expected_atlas_fixedscale2.png
  17. BIN ...testdata/control_images/expected_atlas_fixedscale_old_api1/expected_atlas_fixedscale_old_api1.png
  18. BIN ...testdata/control_images/expected_atlas_fixedscale_old_api2/expected_atlas_fixedscale_old_api2.png
  19. BIN tests/testdata/control_images/expected_atlas_hiding1/expected_atlas_hiding1.png
  20. BIN tests/testdata/control_images/expected_atlas_hiding2/expected_atlas_hiding2.png
  21. BIN tests/testdata/control_images/expected_atlas_predefinedscales1/expected_atlas_predefinedscales1.png
  22. BIN tests/testdata/control_images/expected_atlas_predefinedscales2/expected_atlas_predefinedscales2.png
  23. BIN tests/testdata/control_images/expected_atlas_sorting1/expected_atlas_sorting1.png
  24. BIN tests/testdata/control_images/expected_atlas_sorting2/expected_atlas_sorting2.png
  25. BIN tests/testdata/control_images/expected_atlas_two_maps1/expected_atlas_two_maps1.png
  26. BIN tests/testdata/control_images/expected_atlas_two_maps2/expected_atlas_two_maps2.png
  27. BIN .../control_images/expected_composerattributetable_render/expected_composerattributetable_render.png
  28. BIN tests/testdata/control_images/expected_composereffects_blend/expected_composereffects_blend.png
  29. BIN ...ta/control_images/expected_composereffects_transparency/expected_composereffects_transparency.png
  30. BIN ..._images/expected_composerhtml_expressions_disabled/expected_composerhtml_expressions_disabled.png
  31. BIN ...ol_images/expected_composerhtml_expressions_enabled/expected_composerhtml_expressions_enabled.png
  32. BIN tests/testdata/control_images/expected_composerhtml_manual/expected_composerhtml_manual.png
  33. BIN ...s/testdata/control_images/expected_composerhtml_multiframe1/expected_composerhtml_multiframe1.png
  34. BIN ...s/testdata/control_images/expected_composerhtml_multiframe2/expected_composerhtml_multiframe2.png
  35. BIN ...s/testdata/control_images/expected_composerhtml_multiframe3/expected_composerhtml_multiframe3.png
  36. BIN ...testdata/control_images/expected_composerhtml_smartbreaks1/expected_composerhtml_smartbreaks1.png
  37. BIN ...testdata/control_images/expected_composerhtml_smartbreaks2/expected_composerhtml_smartbreaks2.png
  38. BIN ...testdata/control_images/expected_composerhtml_smartbreaks3/expected_composerhtml_smartbreaks3.png
  39. BIN tests/testdata/control_images/expected_composerhtml_table/expected_composerhtml_table.png
  40. BIN ...data/control_images/expected_composerhtml_userstylesheet/expected_composerhtml_userstylesheet.png
  41. BIN tests/testdata/control_images/expected_composermap_crossgrid/expected_composermap_crossgrid.png
  42. BIN ...testdata/control_images/expected_composermap_exteriorticks/expected_composermap_exteriorticks.png
  43. BIN ...ges/expected_composermap_exteriorticks_annotated/expected_composermap_exteriorticks_annotated.png
  44. BIN ...s/expected_composermap_exteriorticks_annotated2/expected_composermap_exteriorticks_annotated2.png
  45. BIN tests/testdata/control_images/expected_composermap_grid/expected_composermap_grid.png
  46. BIN ...testdata/control_images/expected_composermap_gridframeonly/expected_composermap_gridframeonly.png
  47. BIN ..._images/expected_composermap_interiorexteriorticks/expected_composermap_interiorexteriorticks.png
  48. BIN ...posermap_interiorexteriorticks_annotated/expected_composermap_interiorexteriorticks_annotated.png
  49. BIN ...sermap_interiorexteriorticks_annotated2/expected_composermap_interiorexteriorticks_annotated2.png
  50. BIN ...testdata/control_images/expected_composermap_interiorticks/expected_composermap_interiorticks.png
  51. BIN ...ges/expected_composermap_interiorticks_annotated/expected_composermap_interiorticks_annotated.png
  52. BIN ...s/expected_composermap_interiorticks_annotated2/expected_composermap_interiorticks_annotated2.png
  53. BIN tests/testdata/control_images/expected_composermap_lineborder/expected_composermap_lineborder.png
  54. BIN ...ol_images/expected_composermap_lineborder_annotated/expected_composermap_lineborder_annotated.png
  55. BIN ..._images/expected_composermap_lineborder_annotated2/expected_composermap_lineborder_annotated2.png
  56. BIN tests/testdata/control_images/expected_composermap_markergrid/expected_composermap_markergrid.png
  57. BIN tests/testdata/control_images/expected_composermap_overview/expected_composermap_overview.png
  58. BIN .../control_images/expected_composermap_overview_blending/expected_composermap_overview_blending.png
  59. BIN ...data/control_images/expected_composermap_overview_center/expected_composermap_overview_center.png
  60. BIN ...data/control_images/expected_composermap_overview_invert/expected_composermap_overview_invert.png
  61. BIN ...ta/control_images/expected_composermap_overview_rotated/expected_composermap_overview_rotated.png
  62. BIN .../control_images/expected_composermap_overview_rotated2/expected_composermap_overview_rotated2.png
  63. BIN tests/testdata/control_images/expected_composermap_render/expected_composermap_render.png
  64. BIN tests/testdata/control_images/expected_composermap_zebrastyle/expected_composermap_zebrastyle.png
  65. BIN ...data/control_images/expected_composermap_zebrastyle_left/expected_composermap_zebrastyle_left.png
  66. BIN ...ontrol_images/expected_composermap_zebrastyle_lefttop/expected_composermap_zebrastyle_lefttop.png
  67. BIN ...ges/expected_composermap_zebrastyle_lefttopright/expected_composermap_zebrastyle_lefttopright.png
  68. BIN tests/testdata/control_images/expected_composerpaper_bordered/expected_composerpaper_bordered.png
  69. BIN tests/testdata/control_images/expected_composerpaper_default/expected_composerpaper_default.png
  70. BIN ...stdata/control_images/expected_composerpaper_markerborder/expected_composerpaper_markerborder.png
  71. BIN ...testdata/control_images/expected_composerpaper_transparent/expected_composerpaper_transparent.png
  72. BIN .../control_images/expected_composerpicture_badexpression/expected_composerpicture_badexpression.png
  73. BIN ...data/control_images/expected_composerpicture_clip_anchor/expected_composerpicture_clip_anchor.png
  74. BIN ...ges/expected_composerpicture_clip_anchoroversize/expected_composerpicture_clip_anchoroversize.png
  75. BIN ...stdata/control_images/expected_composerpicture_expression/expected_composerpicture_expression.png
  76. BIN ...ta/control_images/expected_composerpicture_itemrotation/expected_composerpicture_itemrotation.png
  77. BIN tests/testdata/control_images/expected_composerpicture_remote/expected_composerpicture_remote.png
  78. BIN ...data/control_images/expected_composerpicture_resize_clip/expected_composerpicture_resize_clip.png
  79. BIN ...ges/expected_composerpicture_resize_frametoimage/expected_composerpicture_resize_frametoimage.png
  80. BIN ...ontrol_images/expected_composerpicture_resize_stretch/expected_composerpicture_resize_stretch.png
  81. BIN ...data/control_images/expected_composerpicture_resize_zoom/expected_composerpicture_resize_zoom.png
  82. BIN ..._images/expected_composerpicture_resize_zoomresize/expected_composerpicture_resize_zoomresize.png
  83. BIN ...s/testdata/control_images/expected_composerpicture_rotation/expected_composerpicture_rotation.png
  84. BIN ...ol_images/expected_composerpicture_svg_frametoimage/expected_composerpicture_svg_frametoimage.png
  85. BIN ...data/control_images/expected_composerpicture_svg_stretch/expected_composerpicture_svg_stretch.png
  86. BIN ...s/testdata/control_images/expected_composerpicture_svg_zoom/expected_composerpicture_svg_zoom.png
  87. BIN ...ontrol_images/expected_composerpicture_svg_zoomresize/expected_composerpicture_svg_zoomresize.png
  88. BIN ...data/control_images/expected_composerpicture_zoom_anchor/expected_composerpicture_zoom_anchor.png
  89. BIN tests/testdata/control_images/expected_composerrotation_label/expected_composerrotation_label.png
  90. BIN ...ol_images/expected_composerrotation_mapitemrotation/expected_composerrotation_mapitemrotation.png
  91. BIN ...ta/control_images/expected_composerrotation_maprotation/expected_composerrotation_maprotation.png
  92. BIN tests/testdata/control_images/expected_composerrotation_shape/expected_composerrotation_shape.png
  93. BIN ...stdata/control_images/expected_composerscalebar_doublebox/expected_composerscalebar_doublebox.png
  94. BIN ...s/testdata/control_images/expected_composerscalebar_numeric/expected_composerscalebar_numeric.png
  95. BIN ...stdata/control_images/expected_composerscalebar_singlebox/expected_composerscalebar_singlebox.png
  96. BIN ...ol_images/expected_composerscalebar_singlebox_alpha/expected_composerscalebar_singlebox_alpha.png
  97. BIN tests/testdata/control_images/expected_composerscalebar_tick/expected_composerscalebar_tick.png
  98. BIN tests/testdata/control_images/expected_composershapes_ellipse/expected_composershapes_ellipse.png
  99. BIN ...s/testdata/control_images/expected_composershapes_rectangle/expected_composershapes_rectangle.png
  100. BIN ...stdata/control_images/expected_composershapes_roundedrect/expected_composershapes_roundedrect.png
  101. BIN tests/testdata/control_images/expected_composershapes_symbolv2/expected_composershapes_symbolv2.png
  102. BIN tests/testdata/control_images/expected_composershapes_triangle/expected_composershapes_triangle.png
  103. BIN tests/testdata/control_images/expected_piediagram/expected_piediagram.png
  104. BIN tests/testdata/control_images/expected_piediagram_expression/expected_piediagram_expression.png
@@ -43,25 +43,26 @@ bool QgsCompositionChecker::testComposition( QString &report, int page, int pixe
return false;
}

setControlName( "expected_" + mTestName );

#if 0
//fake mode to generate expected image
//assume 300 dpi and size of the control image 3507 * 2480
QImage outputImage( QSize( 3507, 2480 ), QImage::Format_ARGB32 );
//assume 96 dpi and size of the control image 1122 * 794
QImage newImage( QSize( 1122, 794 ), QImage::Format_ARGB32 );
mComposition->setPlotStyle( QgsComposition::Print );
outputImage.setDotsPerMeterX( 300 / 25.4 * 1000 );
outputImage.setDotsPerMeterY( 300 / 25.4 * 1000 );
outputImage.fill( 0 );
QPainter p( &outputImage );
newImage.setDotsPerMeterX( 96 / 25.4 * 1000 );
newImage.setDotsPerMeterY( 96 / 25.4 * 1000 );
newImage.fill( 0 );
QPainter expectedPainter( &newImage );
//QRectF sourceArea( 0, 0, mComposition->paperWidth(), mComposition->paperHeight() );
//QRectF targetArea( 0, 0, 3507, 2480 );
mComposition->renderPage( &p, page );
p.end();
outputImage.save( "/tmp/composerhtml_table_control.png", "PNG" );
return false;
mComposition->renderPage( &expectedPainter, page );
expectedPainter.end();
newImage.save( mExpectedImageFile, "PNG" );
return true;
#endif //0

//load expected image
setControlName( "expected_" + mTestName );
QImage expectedImage( mExpectedImageFile );

//get width/height, create image and render the composition to it
@@ -216,7 +216,7 @@ void TestQgsAtlasComposition::autoscale_render()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_autoscale%1" ).arg((( int )fit ) + 1 ), mComposition );
QVERIFY( checker.testComposition( mReport, 0, 200 ) );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}
mAtlas->endRender();
mAtlasMap->setAtlasDriven( false );
@@ -239,7 +239,7 @@ void TestQgsAtlasComposition::autoscale_render_2_0_api()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_autoscale_old_api%1" ).arg((( int )fit ) + 1 ), mComposition );
QVERIFY( checker.testComposition( mReport, 0, 200 ) );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}
mAtlas->endRender();
Q_NOWARN_DEPRECATED_PUSH
@@ -263,7 +263,7 @@ void TestQgsAtlasComposition::fixedscale_render()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_fixedscale%1" ).arg((( int )fit ) + 1 ), mComposition );
QVERIFY( checker.testComposition( mReport, 0, 200 ) );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}
mAtlas->endRender();

@@ -285,7 +285,7 @@ void TestQgsAtlasComposition::fixedscale_render_2_0_api()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_fixedscale_old_api%1" ).arg((( int )fit ) + 1 ), mComposition );
QVERIFY( checker.testComposition( mReport, 0, 200 ) );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}
mAtlas->endRender();
Q_NOWARN_DEPRECATED_PUSH
@@ -321,7 +321,7 @@ void TestQgsAtlasComposition::predefinedscales_render()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_predefinedscales%1" ).arg((( int )fit ) + 1 ), mComposition );
QVERIFY( checker.testComposition( mReport, 0, 200 ) );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}
mAtlas->endRender();

@@ -345,7 +345,7 @@ void TestQgsAtlasComposition::two_map_autoscale_render()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_two_maps%1" ).arg((( int )fit ) + 1 ), mComposition );
QVERIFY( checker.testComposition( mReport, 0, 200 ) );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}
mAtlas->endRender();
mAtlasMap->setAtlasDriven( false );
@@ -368,7 +368,7 @@ void TestQgsAtlasComposition::hiding_render()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_hiding%1" ).arg((( int )fit ) + 1 ), mComposition );
QVERIFY( checker.testComposition( mReport, 0, 200 ) );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}
mAtlas->endRender();
}
@@ -392,7 +392,7 @@ void TestQgsAtlasComposition::sorting_render()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_sorting%1" ).arg((( int )fit ) + 1 ), mComposition );
QVERIFY( checker.testComposition( mReport, 0, 200 ) );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}
mAtlas->endRender();
}
@@ -417,7 +417,7 @@ void TestQgsAtlasComposition::filtering_render()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_filtering%1" ).arg((( int )fit ) + 1 ), mComposition );
QVERIFY( checker.testComposition( mReport, 0, 200 ) );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}
mAtlas->endRender();
}
@@ -102,7 +102,7 @@ void TestQgsComposerMap::render()
mComposerMap->setNewExtent( QgsRectangle( 781662.375, 3339523.125, 793062.375, 3345223.125 ) );
QgsCompositionChecker checker( "composermap_render", mComposition );

QVERIFY( checker.testComposition( mReport, 0, 100 ) );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}

void TestQgsComposerMap::uniqueId()
@@ -119,7 +119,7 @@ void TestQgsComposerMapGrid::grid()
qWarning() << "grid annotation font: " << mComposerMap->grid()->annotationFont().toString() << " exactMatch:" << mComposerMap->grid()->annotationFont().exactMatch();
QgsCompositionChecker checker( "composermap_grid", mComposition );

bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
mComposerMap->grid()->setEnabled( false );
mComposerMap->grid()->setAnnotationEnabled( false );
QVERIFY( testResult );
@@ -139,7 +139,7 @@ void TestQgsComposerMapGrid::crossGrid()
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );
QgsCompositionChecker checker( "composermap_crossgrid", mComposition );

bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
mComposerMap->grid()->setStyle( QgsComposerMapGrid::Solid );
mComposerMap->grid()->setEnabled( false );
mComposerMap->grid()->setAnnotationEnabled( false );
@@ -157,7 +157,7 @@ void TestQgsComposerMapGrid::markerGrid()
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );
QgsCompositionChecker checker( "composermap_markergrid", mComposition );

bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
mComposerMap->grid()->setStyle( QgsComposerMapGrid::Solid );
mComposerMap->grid()->setEnabled( false );
mComposerMap->grid()->setAnnotationEnabled( false );
@@ -178,7 +178,7 @@ void TestQgsComposerMapGrid::frameOnly()
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );
QgsCompositionChecker checker( "composermap_gridframeonly", mComposition );

bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
mComposerMap->grid()->setStyle( QgsComposerMapGrid::Solid );
mComposerMap->grid()->setEnabled( false );
mComposerMap->grid()->setAnnotationEnabled( false );
@@ -203,7 +203,7 @@ void TestQgsComposerMapGrid::zebraStyle()

QgsCompositionChecker checker( "composermap_zebrastyle", mComposition );

bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );
}

@@ -228,17 +228,17 @@ void TestQgsComposerMapGrid::zebraStyleSides()
mComposerMap->grid()->setFrameSideFlag( QgsComposerMapGrid::FrameBottom, false );

QgsCompositionChecker checker( "composermap_zebrastyle_left", mComposition );
bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

mComposerMap->grid()->setFrameSideFlag( QgsComposerMapGrid::FrameTop, true );
QgsCompositionChecker checker2( "composermap_zebrastyle_lefttop", mComposition );
bool testResult2 = checker2.testComposition( mReport, 0, 100 );
bool testResult2 = checker2.testComposition( mReport, 0, 0 );
QVERIFY( testResult2 );

mComposerMap->grid()->setFrameSideFlag( QgsComposerMapGrid::FrameRight, true );
QgsCompositionChecker checker3( "composermap_zebrastyle_lefttopright", mComposition );
bool testResult3 = checker3.testComposition( mReport, 0, 100 );
bool testResult3 = checker3.testComposition( mReport, 0, 0 );
QVERIFY( testResult3 );

mComposerMap->grid()->setFrameSideFlag( QgsComposerMapGrid::FrameBottom, true );
@@ -258,7 +258,7 @@ void TestQgsComposerMapGrid::interiorTicks()
mComposerMap->grid()->setStyle( QgsComposerMapGrid::FrameAnnotationsOnly );

QgsCompositionChecker checker( "composermap_interiorticks", mComposition );
bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::NoFrame );
@@ -282,7 +282,7 @@ void TestQgsComposerMapGrid::interiorTicksAnnotated()
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::InsideMapFrame, QgsComposerMapGrid::Bottom );

QgsCompositionChecker checker( "composermap_interiorticks_annotated", mComposition );
bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame, QgsComposerMapGrid::Left );
@@ -291,7 +291,7 @@ void TestQgsComposerMapGrid::interiorTicksAnnotated()
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame, QgsComposerMapGrid::Bottom );

QgsCompositionChecker checker2( "composermap_interiorticks_annotated2", mComposition );
bool testResult2 = checker2.testComposition( mReport, 0, 100 );
bool testResult2 = checker2.testComposition( mReport, 0, 0 );
QVERIFY( testResult2 );

mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::NoFrame );
@@ -310,7 +310,7 @@ void TestQgsComposerMapGrid::exteriorTicks()
mComposerMap->grid()->setStyle( QgsComposerMapGrid::FrameAnnotationsOnly );

QgsCompositionChecker checker( "composermap_exteriorticks", mComposition );
bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::NoFrame );
@@ -334,7 +334,7 @@ void TestQgsComposerMapGrid::exteriorTicksAnnotated()
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::InsideMapFrame, QgsComposerMapGrid::Bottom );

QgsCompositionChecker checker( "composermap_exteriorticks_annotated", mComposition );
bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame, QgsComposerMapGrid::Left );
@@ -343,7 +343,7 @@ void TestQgsComposerMapGrid::exteriorTicksAnnotated()
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame, QgsComposerMapGrid::Bottom );

QgsCompositionChecker checker2( "composermap_exteriorticks_annotated2", mComposition );
bool testResult2 = checker2.testComposition( mReport, 0, 100 );
bool testResult2 = checker2.testComposition( mReport, 0, 0 );
QVERIFY( testResult2 );

mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::NoFrame );
@@ -362,7 +362,7 @@ void TestQgsComposerMapGrid::interiorExteriorTicks()
mComposerMap->grid()->setStyle( QgsComposerMapGrid::FrameAnnotationsOnly );

QgsCompositionChecker checker( "composermap_interiorexteriorticks", mComposition );
bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::NoFrame );
@@ -386,7 +386,7 @@ void TestQgsComposerMapGrid::interiorExteriorTicksAnnotated()
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::InsideMapFrame, QgsComposerMapGrid::Bottom );

QgsCompositionChecker checker( "composermap_interiorexteriorticks_annotated", mComposition );
bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame, QgsComposerMapGrid::Left );
@@ -395,7 +395,7 @@ void TestQgsComposerMapGrid::interiorExteriorTicksAnnotated()
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame, QgsComposerMapGrid::Bottom );

QgsCompositionChecker checker2( "composermap_interiorexteriorticks_annotated2", mComposition );
bool testResult2 = checker2.testComposition( mReport, 0, 100 );
bool testResult2 = checker2.testComposition( mReport, 0, 0 );
QVERIFY( testResult2 );

mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::NoFrame );
@@ -414,7 +414,7 @@ void TestQgsComposerMapGrid::lineBorder()
mComposerMap->grid()->setStyle( QgsComposerMapGrid::FrameAnnotationsOnly );

QgsCompositionChecker checker( "composermap_lineborder", mComposition );
bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::NoFrame );
@@ -438,7 +438,7 @@ void TestQgsComposerMapGrid::lineBorderAnnotated()
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::InsideMapFrame, QgsComposerMapGrid::Bottom );

QgsCompositionChecker checker( "composermap_lineborder_annotated", mComposition );
bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame, QgsComposerMapGrid::Left );
@@ -447,7 +447,7 @@ void TestQgsComposerMapGrid::lineBorderAnnotated()
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame, QgsComposerMapGrid::Bottom );

QgsCompositionChecker checker2( "composermap_lineborder_annotated2", mComposition );
bool testResult2 = checker2.testComposition( mReport, 0, 100 );
bool testResult2 = checker2.testComposition( mReport, 0, 0 );
QVERIFY( testResult2 );

mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::NoFrame );
@@ -111,7 +111,7 @@ void TestQgsComposerMapOverview::overviewMap()
overviewMap->overview()->setFrameMap( mComposerMap->id() );
QgsCompositionChecker checker( "composermap_overview", mComposition );

bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
mComposition->removeComposerItem( overviewMap );
QVERIFY( testResult );
}
@@ -127,7 +127,7 @@ void TestQgsComposerMapOverview::overviewMapRotated()
overviewMap->overview()->setFrameMap( mComposerMap->id() );
QgsCompositionChecker checker( "composermap_overview_rotated", mComposition );

bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
mComposition->removeComposerItem( overviewMap );
mComposerMap->setMapRotation( 0 );
QVERIFY( testResult );
@@ -144,7 +144,7 @@ void TestQgsComposerMapOverview::overviewMapRotated2()
overviewMap->overview()->setFrameMap( mComposerMap->id() );
QgsCompositionChecker checker( "composermap_overview_rotated2", mComposition );

bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
mComposition->removeComposerItem( overviewMap );
QVERIFY( testResult );
}
@@ -161,7 +161,7 @@ void TestQgsComposerMapOverview::overviewMapBlending()

QgsCompositionChecker checker( "composermap_overview_blending", mComposition );

bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
mComposition->removeComposerItem( overviewMapBlend );
QVERIFY( testResult );
}
@@ -178,7 +178,7 @@ void TestQgsComposerMapOverview::overviewMapInvert()

QgsCompositionChecker checker( "composermap_overview_invert", mComposition );

bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
mComposition->removeComposerItem( overviewMapInvert );
QVERIFY( testResult );
}
@@ -195,7 +195,7 @@ void TestQgsComposerMapOverview::overviewMapCenter()

QgsCompositionChecker checker( "composermap_overview_center", mComposition );

bool testResult = checker.testComposition( mReport, 0, 100 );
bool testResult = checker.testComposition( mReport, 0, 0 );
mComposition->removeComposerItem( overviewMapCenter );
QVERIFY( testResult );
}
@@ -128,7 +128,7 @@ void TestQgsComposerPaper::markerLinePaper()
{
mComposition->setPageStyleSymbol( mMarkerLineSymbol );
QgsCompositionChecker checker( "composerpaper_markerborder", mComposition );
QVERIFY( checker.testComposition( mReport, 0, 60 ) );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}

QTEST_MAIN( TestQgsComposerPaper )

0 comments on commit 3af68f4

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