Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus authored and nyalldawson committed May 26, 2020
1 parent 4754a2d commit e8b8d1c
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/src/core/testqgscentroidfillsymbol.cpp
Expand Up @@ -55,6 +55,9 @@ class TestQgsCentroidFillSymbol : public QObject
void centroidFillSymbol();
void centroidFillSymbolPointOnSurface();
void centroidFillSymbolPartBiggest();
void centroidFillClipPoints();
void centroidFillClipOnCurrentPartOnly();
void centroidFillClipOnCurrentPartOnlyBiggest();

private:
bool mTestHasError = false ;
Expand Down Expand Up @@ -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
//
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.
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 e8b8d1c

Please sign in to comment.