Skip to content
Permalink
Browse files

Fix some tests on Fedora

  • Loading branch information
m-kuhn committed Jun 16, 2015
1 parent 2798ab0 commit fb7d0d2e18580ab38901c3be1c85ce3c77e61d60
Showing with 17 additions and 31 deletions.
  1. +17 −31 tests/src/core/testqgscomposermapgrid.cpp
  2. BIN ...xpected_composermap_exteriorticks_annotated/expected_composermap_exteriorticks_annotated_mask.png
  3. BIN ...ected_composermap_exteriorticks_annotated2/expected_composermap_exteriorticks_annotated2_mask.png
  4. BIN ...map_interiorexteriorticks_annotated/expected_composermap_interiorexteriorticks_annotated_mask.png
  5. BIN ...p_interiorexteriorticks_annotated2/expected_composermap_interiorexteriorticks_annotated2_mask.png
  6. BIN ...xpected_composermap_interiorticks_annotated/expected_composermap_interiorticks_annotated_mask.png
  7. BIN ...ected_composermap_interiorticks_annotated2/expected_composermap_interiorticks_annotated2_mask.png
  8. BIN ...ages/expected_composermap_lineborder_annotated/expected_composermap_lineborder_annotated_mask.png
  9. BIN ...es/expected_composermap_lineborder_annotated2/expected_composermap_lineborder_annotated2_mask.png
  10. BIN ...ted_composermap_verticaldescending_inside/expected_composermap_verticaldescending_inside_mask.png
  11. BIN ...d_composermap_verticaldescending_outside/expected_composermap_verticaldescending_outside_mask.png
  12. BIN ...tdata/control_images/expected_composerscalebar_numeric/expected_composerscalebar_numeric_mask.png
  13. BIN tests/testdata/control_images/expected_composerscalebar_tick/expected_composerscalebar_tick_mask.png
  14. BIN ...ages/expected_composerutils_drawtext_rectalign/expected_composerutils_drawtext_rectalign_mask.png
  15. BIN ...images/expected_composerutils_drawtext_rectflag/expected_composerutils_drawtext_rectflag_mask.png
  16. BIN .../expected_composerutils_drawtext_rectnocolor/expected_composerutils_drawtext_rectnocolor_mask.png
  17. BIN tests/testdata/control_images/expected_pal_canvas/sp_background_rect/sp_background_rect_mask.png
  18. BIN ...ntrol_images/expected_pal_canvas/sp_background_rect_w_offset/sp_background_rect_w_offset_mask.png
  19. BIN tests/testdata/control_images/expected_pal_canvas/sp_background_svg/sp_background_svg_mask.png
  20. BIN ...control_images/expected_pal_canvas/sp_background_svg_w_offset/sp_background_svg_w_offset_mask.png
  21. BIN tests/testdata/control_images/expected_pal_canvas/sp_default_label/sp_default_label_mask.png
  22. BIN ...control_images/expected_pal_canvas/sp_partials_labels_enabled/sp_partials_labels_enabled_mask.png
  23. BIN tests/testdata/control_images/expected_pal_canvas/sp_text_color/sp_text_color_mask.png
  24. BIN .../testdata/control_images/expected_pal_canvas/sp_text_size_map_unit/sp_text_size_map_unit_mask.png
  25. BIN ...tdata/control_images/expected_pal_composer/sp_img_background_rect/sp_img_background_rect_mask.png
  26. BIN ...es/expected_pal_composer/sp_img_background_rect_w_offset/sp_img_background_rect_w_offset_mask.png
  27. BIN ...estdata/control_images/expected_pal_composer/sp_img_background_svg/sp_img_background_svg_mask.png
  28. BIN ...ages/expected_pal_composer/sp_img_background_svg_w_offset/sp_img_background_svg_w_offset_mask.png
  29. BIN .../testdata/control_images/expected_pal_composer/sp_img_default_label/sp_img_default_label_mask.png
  30. BIN ...ages/expected_pal_composer/sp_img_partials_labels_enabled/sp_img_partials_labels_enabled_mask.png
  31. BIN tests/testdata/control_images/expected_pal_composer/sp_img_text_color/sp_img_text_color_mask.png
  32. BIN ...control_images/expected_pal_composer/sp_img_text_size_map_unit/sp_img_text_size_map_unit_mask.png
  33. BIN ...tdata/control_images/expected_pal_composer/sp_pdf_background_rect/sp_pdf_background_rect_mask.png
  34. BIN ...es/expected_pal_composer/sp_pdf_background_rect_w_offset/sp_pdf_background_rect_w_offset_mask.png
  35. BIN ...estdata/control_images/expected_pal_composer/sp_pdf_background_svg/sp_pdf_background_svg_mask.png
  36. BIN ...ages/expected_pal_composer/sp_pdf_background_svg_w_offset/sp_pdf_background_svg_w_offset_mask.png
  37. BIN .../testdata/control_images/expected_pal_composer/sp_pdf_default_label/sp_pdf_default_label_mask.png
  38. BIN ...ages/expected_pal_composer/sp_pdf_partials_labels_enabled/sp_pdf_partials_labels_enabled_mask.png
  39. BIN tests/testdata/control_images/expected_pal_composer/sp_pdf_text_color/sp_pdf_text_color_mask.png
  40. BIN ...control_images/expected_pal_composer/sp_pdf_text_size_map_unit/sp_pdf_text_size_map_unit_mask.png
  41. BIN ...tdata/control_images/expected_pal_composer/sp_svg_background_rect/sp_svg_background_rect_mask.png
  42. BIN ...es/expected_pal_composer/sp_svg_background_rect_w_offset/sp_svg_background_rect_w_offset_mask.png
  43. BIN ...estdata/control_images/expected_pal_composer/sp_svg_background_svg/sp_svg_background_svg_mask.png
  44. BIN ...ages/expected_pal_composer/sp_svg_background_svg_w_offset/sp_svg_background_svg_w_offset_mask.png
  45. BIN .../testdata/control_images/expected_pal_composer/sp_svg_default_label/sp_svg_default_label_mask.png
  46. BIN ...ages/expected_pal_composer/sp_svg_partials_labels_enabled/sp_svg_partials_labels_enabled_mask.png
  47. BIN tests/testdata/control_images/expected_pal_composer/sp_svg_text_color/sp_svg_text_color_mask.png
  48. BIN ...control_images/expected_pal_composer/sp_svg_text_size_map_unit/sp_svg_text_size_map_unit_mask.png
  49. BIN ...rol_images/maprotation/expected_lines-parallel-label+45/expected_lines-parallel-label+45_mask.png
@@ -77,23 +77,11 @@ void TestQgsComposerMapGrid::initTestCase()
QgsApplication::init();
QgsApplication::initQgis();

QgsCoordinateReferenceSystem crs = QgsCoordinateReferenceSystem( 32633 );
mMapSettings.setDestinationCrs( crs );
mMapSettings.setCrsTransformEnabled( false );
mComposition = new QgsComposition( mMapSettings );
mComposition->setPaperSize( 297, 210 ); //A4 landscape
mComposerMap = new QgsComposerMap( mComposition, 20, 20, 200, 100 );
mComposerMap->setFrameEnabled( true );
mComposerMap->setBackgroundColor( QColor( 150, 100, 100 ) );
mComposition->addComposerMap( mComposerMap );

mReport = "<h1>Composer Map Grid Tests</h1>\n";
}

void TestQgsComposerMapGrid::cleanupTestCase()
{
delete mComposition;

QString myReportFile = QDir::tempPath() + QDir::separator() + "qgistest.html";
QFile myFile( myReportFile );
if ( myFile.open( QIODevice::WriteOnly | QIODevice::Append ) )
@@ -108,24 +96,35 @@ void TestQgsComposerMapGrid::cleanupTestCase()

void TestQgsComposerMapGrid::init()
{
QgsCoordinateReferenceSystem crs = QgsCoordinateReferenceSystem( 32633 );
mMapSettings.setDestinationCrs( crs );
mMapSettings.setCrsTransformEnabled( false );
mComposition = new QgsComposition( mMapSettings );
mComposition->setPaperSize( 297, 210 ); //A4 landscape
mComposerMap = new QgsComposerMap( mComposition, 20, 20, 200, 100 );
mComposerMap->setFrameEnabled( true );
mComposerMap->setBackgroundColor( QColor( 150, 100, 100 ) );
mComposerMap->grid()->setAnnotationFont( QgsFontUtils::getStandardTestFont() );
mComposerMap->grid()->setAnnotationPrecision( 0 );
mComposerMap->grid()->setIntervalX( 2000 );
mComposerMap->grid()->setIntervalY( 2000 );
mComposerMap->grid()->setGridLineWidth( 0.5 );
mComposerMap->grid()->setGridLineColor( QColor( 0, 0, 0 ) );
mComposition->addComposerMap( mComposerMap );
}

void TestQgsComposerMapGrid::cleanup()
{

delete mComposition;
}

void TestQgsComposerMapGrid::grid()
{
mComposerMap->setNewExtent( QgsRectangle( 781662.375, 3339523.125, 793062.375, 3345223.125 ) );
mComposerMap->grid()->setEnabled( true );
mComposerMap->grid()->setIntervalX( 2000 );
mComposerMap->grid()->setIntervalY( 2000 );

mComposerMap->grid()->setAnnotationEnabled( true );
mComposerMap->grid()->setGridLineColor( QColor( 0, 255, 0 ) );
mComposerMap->grid()->setGridLineWidth( 0.5 );
mComposerMap->grid()->setAnnotationFont( QgsFontUtils::getStandardTestFont() );
mComposerMap->grid()->setAnnotationPrecision( 0 );
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::Disabled, QgsComposerMapGrid::Left );
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::OutsideMapFrame, QgsComposerMapGrid::Right );
mComposerMap->grid()->setAnnotationPosition( QgsComposerMapGrid::Disabled, QgsComposerMapGrid::Top );
@@ -152,8 +151,6 @@ void TestQgsComposerMapGrid::reprojected()
mComposerMap->grid()->setIntervalX( 1 );
mComposerMap->grid()->setIntervalY( 1 );
mComposerMap->grid()->setAnnotationEnabled( false );
mComposerMap->grid()->setGridLineColor( QColor( 0, 0, 0 ) );
mComposerMap->grid()->setGridLineWidth( 0.5 );
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );
mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::ExteriorTicks );
mComposerMap->grid()->setFrameWidth( 10 );
@@ -174,11 +171,8 @@ void TestQgsComposerMapGrid::crossGrid()
mComposerMap->grid()->setEnabled( true );
mComposerMap->grid()->setStyle( QgsComposerMapGrid::Cross );
mComposerMap->grid()->setCrossLength( 2.0 );
mComposerMap->grid()->setIntervalX( 2000 );
mComposerMap->grid()->setIntervalY( 2000 );
mComposerMap->grid()->setAnnotationEnabled( false );
mComposerMap->grid()->setGridLineColor( QColor( 0, 255, 0 ) );
mComposerMap->grid()->setGridLineWidth( 0.5 );
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );
QgsCompositionChecker checker( "composermap_crossgrid", mComposition );

@@ -194,8 +188,6 @@ void TestQgsComposerMapGrid::markerGrid()
mComposerMap->setNewExtent( QgsRectangle( 781662.375, 3339523.125, 793062.375, 3345223.125 ) );
mComposerMap->grid()->setEnabled( true );
mComposerMap->grid()->setStyle( QgsComposerMapGrid::Markers );
mComposerMap->grid()->setIntervalX( 2000 );
mComposerMap->grid()->setIntervalY( 2000 );
mComposerMap->grid()->setAnnotationEnabled( false );
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );
QgsCompositionChecker checker( "composermap_markergrid", mComposition );
@@ -212,8 +204,6 @@ void TestQgsComposerMapGrid::frameOnly()
mComposerMap->setNewExtent( QgsRectangle( 781662.375, 3339523.125, 793062.375, 3345223.125 ) );
mComposerMap->grid()->setEnabled( true );
mComposerMap->grid()->setStyle( QgsComposerMapGrid::FrameAnnotationsOnly );
mComposerMap->grid()->setIntervalX( 2000 );
mComposerMap->grid()->setIntervalY( 2000 );
mComposerMap->grid()->setAnnotationEnabled( false );
//set a frame for testing
mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::Zebra );
@@ -233,7 +223,6 @@ void TestQgsComposerMapGrid::frameOnly()
void TestQgsComposerMapGrid::zebraStyle()
{
mComposerMap->setNewExtent( QgsRectangle( 785462.375, 3341423.125, 789262.375, 3343323.125 ) ); //zoom in
mComposerMap->grid()->setGridLineColor( QColor( 0, 0, 0 ) );
mComposerMap->grid()->setAnnotationFontColor( QColor( 0, 0, 0, 0 ) );
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );

@@ -254,7 +243,6 @@ void TestQgsComposerMapGrid::zebraStyle()
void TestQgsComposerMapGrid::zebraStyleSides()
{
mComposerMap->setNewExtent( QgsRectangle( 781662.375, 3339523.125, 793062.375, 3345223.125 ) );
mComposerMap->grid()->setGridLineColor( QColor( 0, 0, 0 ) );
mComposerMap->grid()->setAnnotationFontColor( QColor( 0, 0, 0, 0 ) );
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );

@@ -297,7 +285,6 @@ void TestQgsComposerMapGrid::frameDivisions()
mComposerMap->setMapRotation( 45.0 );

//setup defaults
mComposerMap->grid()->setGridLineColor( QColor( 0, 0, 0 ) );
mComposerMap->grid()->setAnnotationFontColor( QColor( 0, 0, 0, 0 ) );
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );
mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::Zebra );
@@ -340,7 +327,6 @@ void TestQgsComposerMapGrid::annotationFilter()
mComposerMap->setMapRotation( 45.0 );

//setup defaults
mComposerMap->grid()->setGridLineColor( QColor( 0, 0, 0 ) );
mComposerMap->grid()->setAnnotationFontColor( QColor( 0, 0, 0, 0 ) );
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );
mComposerMap->grid()->setFrameStyle( QgsComposerMapGrid::NoFrame );
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.

0 comments on commit fb7d0d2

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