Skip to content
Permalink
Browse files

add simple marker join style tests

  • Loading branch information
nirvn committed Apr 3, 2016
1 parent 6ad3537 commit 3a2a099c596d21d6527a8b607e11b091fa12e348
@@ -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:
@@ -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 ) );
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 3a2a099

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