Skip to content

Commit

Permalink
Add unit test for composermap zebra style
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Oct 5, 2012
1 parent 51d97ff commit 53305f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/src/core/testqgscomposermap.cpp
Expand Up @@ -38,6 +38,7 @@ class TestQgsComposerMap: public QObject
void grid(); //test if grid and grid annotation works
void overviewMap(); //test if overview map frame works
void uniqueId(); //test if map id is adapted when doing copy paste
void zebraStyle(); //test zebra map border style

private:
QgsComposition* mComposition;
Expand Down Expand Up @@ -161,5 +162,16 @@ void TestQgsComposerMap::uniqueId()
QVERIFY( oldId != newId );
}

void TestQgsComposerMap::zebraStyle()
{
mComposerMap->setGridFrameStyle( QgsComposerMap::Zebra );
mComposerMap->setGridEnabled( true );

QgsCompositionChecker checker( "Composer map zebra", mComposition, QString( QString( TEST_DATA_DIR ) + QDir::separator() +
"control_images" + QDir::separator() + "expected_composermap" + QDir::separator() + "composermap_zebra_style.png" ) );
bool testResult = checker.testComposition();
QVERIFY( testResult );
}

QTEST_MAIN( TestQgsComposerMap )
#include "moc_testqgscomposermap.cxx"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 53305f0

Please sign in to comment.