Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add simple marker join style tests
  • Loading branch information
nirvn committed Apr 3, 2016
1 parent 6ad3537 commit 3a2a099
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions tests/src/core/testqgssimplemarker.cpp
Expand Up @@ -59,6 +59,9 @@ class TestQgsSimpleMarkerSymbol : public QObject
void cleanup() {} // will be called after every testfunction.

void simpleMarkerSymbol();
void simpleMarkerSymbolBevelJoin();
void simpleMarkerSymbolMiterJoin();
void simpleMarkerSymbolRoundJoin();
void bounds();

private:
Expand Down Expand Up @@ -140,6 +143,45 @@ void TestQgsSimpleMarkerSymbol::simpleMarkerSymbol()
QVERIFY( imageCheck( "simplemarker" ) );
}

void TestQgsSimpleMarkerSymbol::simpleMarkerSymbolBevelJoin()
{
mReport += "<h2>Simple marker symbol layer test</h2>\n";

mSimpleMarkerLayer->setColor( Qt::blue );
mSimpleMarkerLayer->setBorderColor( Qt::black );
mSimpleMarkerLayer->setName( "triangle" );
mSimpleMarkerLayer->setSize( 25 );
mSimpleMarkerLayer->setOutlineWidth( 3 );
mSimpleMarkerLayer->setPenJoinStyle( Qt::BevelJoin );
QVERIFY( imageCheck( "simplemarker_beveljoin" ) );
}

void TestQgsSimpleMarkerSymbol::simpleMarkerSymbolMiterJoin()
{
mReport += "<h2>Simple marker symbol layer test</h2>\n";

mSimpleMarkerLayer->setColor( Qt::blue );
mSimpleMarkerLayer->setBorderColor( Qt::black );
mSimpleMarkerLayer->setName( "triangle" );
mSimpleMarkerLayer->setSize( 25 );
mSimpleMarkerLayer->setOutlineWidth( 3 );
mSimpleMarkerLayer->setPenJoinStyle( Qt::MiterJoin );
QVERIFY( imageCheck( "simplemarker_miterjoin" ) );
}

void TestQgsSimpleMarkerSymbol::simpleMarkerSymbolRoundJoin()
{
mReport += "<h2>Simple marker symbol layer test</h2>\n";

mSimpleMarkerLayer->setColor( Qt::blue );
mSimpleMarkerLayer->setBorderColor( Qt::black );
mSimpleMarkerLayer->setName( "triangle" );
mSimpleMarkerLayer->setSize( 25 );
mSimpleMarkerLayer->setOutlineWidth( 3 );
mSimpleMarkerLayer->setPenJoinStyle( Qt::RoundJoin );
QVERIFY( imageCheck( "simplemarker_roundjoin" ) );
}

void TestQgsSimpleMarkerSymbol::bounds()
{
mSimpleMarkerLayer->setColor( QColor( 200, 200, 200 ) );
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 3a2a099

Please sign in to comment.