Skip to content
Permalink
Browse files

Cleanup control_images folder by grouping some tests in subfolders

  • Loading branch information
nyalldawson committed Aug 30, 2015
1 parent e583d88 commit 0c5475545fbfd7faa7d1b0381339ec726319f913
Showing 335 changed files with 144 additions and 0 deletions.
@@ -243,6 +243,7 @@ void TestQgsAtlasComposition::autoscale_render()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_autoscale%1" ).arg((( int )fit ) + 1 ), mComposition );
checker.setControlPathPrefix( "atlas" );
QVERIFY( checker.testComposition( mReport, 0, 100 ) );
}
mAtlas->endRender();
@@ -264,6 +265,7 @@ void TestQgsAtlasComposition::autoscale_render_2_0_api()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_autoscale_old_api%1" ).arg((( int )fit ) + 1 ), mComposition );
checker.setControlPathPrefix( "atlas" );
QVERIFY( checker.testComposition( mReport, 0, 100 ) );
}
mAtlas->endRender();
@@ -285,6 +287,7 @@ void TestQgsAtlasComposition::fixedscale_render()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_fixedscale%1" ).arg((( int )fit ) + 1 ), mComposition );
checker.setControlPathPrefix( "atlas" );
QVERIFY( checker.testComposition( mReport, 0, 100 ) );
}
mAtlas->endRender();
@@ -305,6 +308,7 @@ void TestQgsAtlasComposition::fixedscale_render_2_0_api()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_fixedscale_old_api%1" ).arg((( int )fit ) + 1 ), mComposition );
checker.setControlPathPrefix( "atlas" );
QVERIFY( checker.testComposition( mReport, 0, 100 ) );
}
mAtlas->endRender();
@@ -339,6 +343,7 @@ void TestQgsAtlasComposition::predefinedscales_render()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_predefinedscales%1" ).arg((( int )fit ) + 1 ), mComposition );
checker.setControlPathPrefix( "atlas" );
QVERIFY( checker.testComposition( mReport, 0, 100 ) );
}
mAtlas->endRender();
@@ -361,6 +366,7 @@ void TestQgsAtlasComposition::two_map_autoscale_render()
mLabel1->adjustSizeToText();

QgsCompositionChecker checker( QString( "atlas_two_maps%1" ).arg((( int )fit ) + 1 ), mComposition );
checker.setControlPathPrefix( "atlas" );
QVERIFY( checker.testComposition( mReport, 0, 100 ) );
}
mAtlas->endRender();
@@ -381,6 +387,7 @@ void TestQgsAtlasComposition::hiding_render()
mLabel1->adjustSizeToText();

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

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

QgsCompositionChecker checker( QString( "atlas_filtering%1" ).arg((( int )fit ) + 1 ), mComposition );
checker.setControlPathPrefix( "atlas" );
QVERIFY( checker.testComposition( mReport, 0, 100 ) );
}
mAtlas->endRender();
@@ -108,6 +108,7 @@ void TestQgsComposerEffects::blend_modes()
mComposerRect2->setBlendMode( QPainter::CompositionMode_Multiply );

QgsCompositionChecker checker( "composereffects_blend", mComposition );
checker.setControlPathPrefix( "composer_effects" );
QVERIFY( checker.testComposition( mReport ) );
// reset blending
mComposerRect2->setBlendMode( QPainter::CompositionMode_SourceOver );
@@ -118,6 +119,7 @@ void TestQgsComposerEffects::transparency()
mComposerRect2->setTransparency( 50 );

QgsCompositionChecker checker( "composereffects_transparency", mComposition );
checker.setControlPathPrefix( "composer_effects" );
QVERIFY( checker.testComposition( mReport ) );
}

@@ -109,6 +109,7 @@ void TestQgsComposerHtml::sourceMode()
htmlItem->loadHtml();

QgsCompositionChecker checker( "composerhtml_manual", mComposition );
checker.setControlPathPrefix( "composer_html" );
bool result = checker.testComposition( mReport, 0, 100 );
mComposition->removeMultiFrame( htmlItem );
delete htmlItem;
@@ -130,6 +131,7 @@ void TestQgsComposerHtml::userStylesheets()
htmlItem->setUserStylesheetEnabled( true );

QgsCompositionChecker checker( "composerhtml_userstylesheet", mComposition );
checker.setControlPathPrefix( "composer_html" );
bool result = checker.testComposition( mReport, 0, 100 );
mComposition->removeMultiFrame( htmlItem );
delete htmlItem;
@@ -149,6 +151,7 @@ void TestQgsComposerHtml::evalExpressions()
htmlItem->loadHtml();

QgsCompositionChecker checker( "composerhtml_expressions_enabled", mComposition );
checker.setControlPathPrefix( "composer_html" );
bool result = checker.testComposition( mReport );
mComposition->removeMultiFrame( htmlItem );
delete htmlItem;
@@ -167,6 +170,7 @@ void TestQgsComposerHtml::evalExpressionsOff()
htmlItem->loadHtml();

QgsCompositionChecker checker( "composerhtml_expressions_disabled", mComposition );
checker.setControlPathPrefix( "composer_html" );
bool result = checker.testComposition( mReport );
mComposition->removeMultiFrame( htmlItem );
delete htmlItem;
@@ -182,6 +186,7 @@ void TestQgsComposerHtml::table()
htmlItem->setUrl( QUrl( QString( "file:///%1/test_html.html" ).arg( TEST_DATA_DIR ) ) );

QgsCompositionChecker checker( "composerhtml_table", mComposition );
checker.setControlPathPrefix( "composer_html" );
bool result = checker.testComposition( mReport );
mComposition->removeMultiFrame( htmlItem );
delete htmlItem;
@@ -200,10 +205,12 @@ void TestQgsComposerHtml::tableMultiFrame()
htmlItem->setUrl( QUrl( QString( "file:///%1/test_html.html" ).arg( TEST_DATA_DIR ) ) );
htmlItem->frame( 0 )->setFrameEnabled( true );
QgsCompositionChecker checker1( "composerhtml_multiframe1", mComposition );
checker1.setControlPathPrefix( "composer_html" );
bool result = checker1.testComposition( mReport );

//page2
QgsCompositionChecker checker2( "composerhtml_multiframe2", mComposition );
checker2.setControlPathPrefix( "composer_html" );
result = checker2.testComposition( mReport, 1 ) && result;

mComposition->removeMultiFrame( htmlItem );
@@ -223,10 +230,12 @@ void TestQgsComposerHtml::htmlMultiFrameSmartBreak()
htmlItem->setUrl( QUrl( QString( "file:///%1/test_html.html" ).arg( TEST_DATA_DIR ) ) );
htmlItem->frame( 0 )->setFrameEnabled( true );
QgsCompositionChecker checker1( "composerhtml_smartbreaks1", mComposition );
checker1.setControlPathPrefix( "composer_html" );
bool result = checker1.testComposition( mReport, 0, 200 );

//page2
QgsCompositionChecker checker2( "composerhtml_smartbreaks2", mComposition );
checker2.setControlPathPrefix( "composer_html" );
result = checker2.testComposition( mReport, 1, 200 ) && result;

mComposition->removeMultiFrame( htmlItem );
@@ -136,6 +136,7 @@ void TestQgsComposerMap::render()
{
mComposerMap->setNewExtent( QgsRectangle( 781662.375, 3339523.125, 793062.375, 3345223.125 ) );
QgsCompositionChecker checker( "composermap_render", mComposition );
checker.setControlPathPrefix( "composer_map" );

QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}
@@ -282,6 +283,7 @@ void TestQgsComposerMap::dataDefinedLayers()
mComposerMap->setNewExtent( QgsRectangle( -110.0, 25.0, -90, 40.0 ) );

QgsCompositionChecker checker( "composermap_ddlayers", mComposition );
checker.setControlPathPrefix( "composer_map" );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}

@@ -337,6 +339,7 @@ void TestQgsComposerMap::dataDefinedStyles()
mComposerMap->setNewExtent( QgsRectangle( -110.0, 25.0, -90, 40.0 ) );

QgsCompositionChecker checker( "composermap_ddstyles", mComposition );
checker.setControlPathPrefix( "composer_map" );
QVERIFY( checker.testComposition( mReport, 0, 0 ) );
}

@@ -140,6 +140,7 @@ void TestQgsComposerMapGrid::grid()
mComposerMap->updateBoundingRect();
qWarning() << "grid annotation font: " << mComposerMap->grid()->annotationFont().toString() << " exactMatch:" << mComposerMap->grid()->annotationFont().exactMatch();
QgsCompositionChecker checker( "composermap_grid", mComposition );
checker.setControlPathPrefix( "composer_mapgrid" );

bool testResult = checker.testComposition( mReport, 0, 0 );
mComposerMap->grid()->setEnabled( false );
@@ -162,6 +163,7 @@ void TestQgsComposerMapGrid::reprojected()
mComposerMap->setFrameEnabled( false );
mComposerMap->updateBoundingRect();
QgsCompositionChecker checker( "composermap_gridreprojected", mComposition );
checker.setControlPathPrefix( "composer_mapgrid" );

bool testResult = checker.testComposition( mReport, 0, 0 );
mComposerMap->grid()->setEnabled( false );
@@ -182,6 +184,7 @@ void TestQgsComposerMapGrid::crossGrid()
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );
mComposerMap->updateBoundingRect();
QgsCompositionChecker checker( "composermap_crossgrid", mComposition );
checker.setControlPathPrefix( "composer_mapgrid" );

bool testResult = checker.testComposition( mReport, 0, 0 );
mComposerMap->grid()->setStyle( QgsComposerMapGrid::Solid );
@@ -199,6 +202,7 @@ void TestQgsComposerMapGrid::markerGrid()
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );
mComposerMap->updateBoundingRect();
QgsCompositionChecker checker( "composermap_markergrid", mComposition );
checker.setControlPathPrefix( "composer_mapgrid" );

bool testResult = checker.testComposition( mReport, 0, 0 );
mComposerMap->grid()->setStyle( QgsComposerMapGrid::Solid );
@@ -220,6 +224,7 @@ void TestQgsComposerMapGrid::frameOnly()
mComposerMap->grid()->setBlendMode( QPainter::CompositionMode_SourceOver );
mComposerMap->updateBoundingRect();
QgsCompositionChecker checker( "composermap_gridframeonly", mComposition );
checker.setControlPathPrefix( "composer_mapgrid" );

bool testResult = checker.testComposition( mReport, 0, 0 );
mComposerMap->grid()->setStyle( QgsComposerMapGrid::Solid );
@@ -245,6 +250,7 @@ void TestQgsComposerMapGrid::zebraStyle()
mComposerMap->updateBoundingRect();

QgsCompositionChecker checker( "composermap_zebrastyle", mComposition );
checker.setControlPathPrefix( "composer_mapgrid" );

bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );
@@ -271,18 +277,21 @@ void TestQgsComposerMapGrid::zebraStyleSides()
mComposerMap->updateBoundingRect();

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

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

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

@@ -314,6 +323,7 @@ void TestQgsComposerMapGrid::frameDivisions()
mComposerMap->updateBoundingRect();

QgsCompositionChecker checker( "composermap_rotatedframe", mComposition );
checker.setControlPathPrefix( "composer_mapgrid" );
bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

@@ -324,6 +334,7 @@ void TestQgsComposerMapGrid::frameDivisions()
mComposerMap->updateBoundingRect();

QgsCompositionChecker checker2( "composermap_framedivisions", mComposition );
checker2.setControlPathPrefix( "composer_mapgrid" );
testResult = checker2.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

@@ -355,6 +366,7 @@ void TestQgsComposerMapGrid::annotationFilter()
mComposerMap->updateBoundingRect();

QgsCompositionChecker checker( "composermap_rotatedannotations", mComposition );
checker.setControlPathPrefix( "composer_mapgrid" );
bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

@@ -365,6 +377,7 @@ void TestQgsComposerMapGrid::annotationFilter()
mComposerMap->updateBoundingRect();

QgsCompositionChecker checker2( "composermap_filteredannotations", mComposition );
checker2.setControlPathPrefix( "composer_mapgrid" );
testResult = checker2.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

@@ -389,6 +402,7 @@ void TestQgsComposerMapGrid::interiorTicks()
mComposerMap->updateBoundingRect();

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

@@ -414,6 +428,7 @@ void TestQgsComposerMapGrid::interiorTicksAnnotated()
mComposerMap->updateBoundingRect();

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

@@ -424,6 +439,7 @@ void TestQgsComposerMapGrid::interiorTicksAnnotated()
mComposerMap->updateBoundingRect();

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

@@ -444,6 +460,7 @@ void TestQgsComposerMapGrid::exteriorTicks()
mComposerMap->updateBoundingRect();

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

@@ -469,6 +486,7 @@ void TestQgsComposerMapGrid::exteriorTicksAnnotated()
mComposerMap->updateBoundingRect();

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

@@ -479,6 +497,7 @@ void TestQgsComposerMapGrid::exteriorTicksAnnotated()
mComposerMap->updateBoundingRect();

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

@@ -499,6 +518,7 @@ void TestQgsComposerMapGrid::interiorExteriorTicks()
mComposerMap->updateBoundingRect();

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

@@ -524,6 +544,7 @@ void TestQgsComposerMapGrid::interiorExteriorTicksAnnotated()
mComposerMap->updateBoundingRect();

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

@@ -534,6 +555,7 @@ void TestQgsComposerMapGrid::interiorExteriorTicksAnnotated()
mComposerMap->updateBoundingRect();

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

@@ -554,6 +576,7 @@ void TestQgsComposerMapGrid::lineBorder()
mComposerMap->updateBoundingRect();

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

@@ -579,6 +602,7 @@ void TestQgsComposerMapGrid::lineBorderAnnotated()
mComposerMap->updateBoundingRect();

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

@@ -589,6 +613,7 @@ void TestQgsComposerMapGrid::lineBorderAnnotated()
mComposerMap->updateBoundingRect();

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

@@ -657,6 +682,7 @@ void TestQgsComposerMapGrid::descendingAnnotations()
mComposerMap->updateBoundingRect();

QgsCompositionChecker checker( "composermap_verticaldescending_inside", mComposition );
checker.setControlPathPrefix( "composer_mapgrid" );
bool testResult = checker.testComposition( mReport, 0, 0 );
QVERIFY( testResult );

@@ -667,6 +693,7 @@ void TestQgsComposerMapGrid::descendingAnnotations()
mComposerMap->updateBoundingRect();

QgsCompositionChecker checker2( "composermap_verticaldescending_outside", mComposition );
checker2.setControlPathPrefix( "composer_mapgrid" );
bool testResult2 = checker2.testComposition( mReport, 0, 0 );
QVERIFY( testResult2 );

0 comments on commit 0c54755

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