Skip to content

Commit

Permalink
Added multilayer(馃オ) test
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus authored and nyalldawson committed May 26, 2020
1 parent 64b30b1 commit a7c6f9c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/src/core/testqgscentroidfillsymbol.cpp
Expand Up @@ -58,6 +58,7 @@ class TestQgsCentroidFillSymbol : public QObject
void centroidFillClipPoints();
void centroidFillClipOnCurrentPartOnly();
void centroidFillClipOnCurrentPartOnlyBiggest();
void centroidFillClipMultiplayerPoints();

private:
bool mTestHasError = false ;
Expand Down Expand Up @@ -177,6 +178,27 @@ void TestQgsCentroidFillSymbol::centroidFillClipOnCurrentPartOnlyBiggest()
mCentroidFill->setPointOnAllParts( true );
}

void TestQgsCentroidFillSymbol::centroidFillClipMultiplayerPoints()
{
QgsSimpleFillSymbolLayer simpleFill(QColor(255, 255, 255, 100));

mCentroidFill = mCentroidFill->clone();
mCentroidFill->setClipPoints( true );

mFillSymbol->deleteSymbolLayer( 0 );
mFillSymbol->appendSymbolLayer( simpleFill.clone() );
mFillSymbol->appendSymbolLayer( mCentroidFill->clone() );
mFillSymbol->appendSymbolLayer( simpleFill.clone() );

QVERIFY( imageCheck( "symbol_centroidfill_clip_multilayer" ) );

mCentroidFill->setClipPoints( false );
mFillSymbol->deleteSymbolLayer( 0 );
mFillSymbol->deleteSymbolLayer( 1 );
mFillSymbol->deleteSymbolLayer( 2 );
mFillSymbol->changeSymbolLayer( 0, mCentroidFill );
}

//
// 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.

0 comments on commit a7c6f9c

Please sign in to comment.