Skip to content
Permalink
Browse files

Added tests

  • Loading branch information
suricactus authored and nyalldawson committed May 26, 2020
1 parent 4754a2d commit e8b8d1cd5985c8b32bde9bf3a7b67b6fbf038484
@@ -55,6 +55,9 @@ class TestQgsCentroidFillSymbol : public QObject
void centroidFillSymbol();
void centroidFillSymbolPointOnSurface();
void centroidFillSymbolPartBiggest();
void centroidFillClipPoints();
void centroidFillClipOnCurrentPartOnly();
void centroidFillClipOnCurrentPartOnlyBiggest();

private:
bool mTestHasError = false ;
@@ -147,6 +150,33 @@ void TestQgsCentroidFillSymbol::centroidFillSymbolPartBiggest()
mCentroidFill->setPointOnAllParts( true );
}

void TestQgsCentroidFillSymbol::centroidFillClipPoints()
{
mCentroidFill->setClipPoints( true );
QVERIFY( imageCheck( "symbol_centroidfill_clip_points" ) );
mCentroidFill->setClipPoints( false );
}

void TestQgsCentroidFillSymbol::centroidFillClipOnCurrentPartOnly()
{
mCentroidFill->setClipPoints( true );
mCentroidFill->setClipOnCurrentPartOnly( true );
QVERIFY( imageCheck( "symbol_centroidfill_clip_current_only" ) );
mCentroidFill->setClipPoints( false );
mCentroidFill->setClipOnCurrentPartOnly( false );
}

void TestQgsCentroidFillSymbol::centroidFillClipOnCurrentPartOnlyBiggest()
{
mCentroidFill->setClipPoints( true );
mCentroidFill->setClipOnCurrentPartOnly( true );
mCentroidFill->setPointOnAllParts( false );
QVERIFY( imageCheck( "symbol_centroidfill_clip_current_biggest" ) );
mCentroidFill->setClipPoints( false );
mCentroidFill->setClipOnCurrentPartOnly( false );
mCentroidFill->setPointOnAllParts( true );
}

//
// Private helper functions not called directly by CTest
//
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit e8b8d1c

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