Skip to content

Commit e8b8d1c

Browse files
suricactusnyalldawson
authored andcommittedMay 26, 2020
Added tests
1 parent 4754a2d commit e8b8d1c

File tree

7 files changed

+30
-0
lines changed

7 files changed

+30
-0
lines changed
 

‎tests/src/core/testqgscentroidfillsymbol.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ class TestQgsCentroidFillSymbol : public QObject
5555
void centroidFillSymbol();
5656
void centroidFillSymbolPointOnSurface();
5757
void centroidFillSymbolPartBiggest();
58+
void centroidFillClipPoints();
59+
void centroidFillClipOnCurrentPartOnly();
60+
void centroidFillClipOnCurrentPartOnlyBiggest();
5861

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

153+
void TestQgsCentroidFillSymbol::centroidFillClipPoints()
154+
{
155+
mCentroidFill->setClipPoints( true );
156+
QVERIFY( imageCheck( "symbol_centroidfill_clip_points" ) );
157+
mCentroidFill->setClipPoints( false );
158+
}
159+
160+
void TestQgsCentroidFillSymbol::centroidFillClipOnCurrentPartOnly()
161+
{
162+
mCentroidFill->setClipPoints( true );
163+
mCentroidFill->setClipOnCurrentPartOnly( true );
164+
QVERIFY( imageCheck( "symbol_centroidfill_clip_current_only" ) );
165+
mCentroidFill->setClipPoints( false );
166+
mCentroidFill->setClipOnCurrentPartOnly( false );
167+
}
168+
169+
void TestQgsCentroidFillSymbol::centroidFillClipOnCurrentPartOnlyBiggest()
170+
{
171+
mCentroidFill->setClipPoints( true );
172+
mCentroidFill->setClipOnCurrentPartOnly( true );
173+
mCentroidFill->setPointOnAllParts( false );
174+
QVERIFY( imageCheck( "symbol_centroidfill_clip_current_biggest" ) );
175+
mCentroidFill->setClipPoints( false );
176+
mCentroidFill->setClipOnCurrentPartOnly( false );
177+
mCentroidFill->setPointOnAllParts( true );
178+
}
179+
150180
//
151181
// Private helper functions not called directly by CTest
152182
//

0 commit comments

Comments
 (0)
Please sign in to comment.