Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix composer map tests
  • Loading branch information
wonder-sk committed May 17, 2016
1 parent deee8e2 commit 7eb05e2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/src/core/testqgscomposermap.cpp
Expand Up @@ -355,9 +355,16 @@ void TestQgsComposerMap::dataDefinedStyles()

QgsProject::instance()->visibilityPresetCollection()->insert( "test preset", rec );

// test following of preset
mComposerMap->setFollowVisibilityPreset( true );
mComposerMap->setFollowVisibilityPresetName( "test preset" );
QSet<QString> result = mComposerMap->layersToRender().toSet();
QCOMPARE( result.count(), 2 );
mComposerMap->setFollowVisibilityPresetName( QString() );

//test malformed style string
mComposerMap->setDataDefinedProperty( QgsComposerObject::MapStylePreset, true, true, "5", QString() );
QSet<QString> result = mComposerMap->layersToRender().toSet();
result = mComposerMap->layersToRender().toSet();
QCOMPARE( result, ms.layers().toSet() );

//test valid preset
Expand Down

0 comments on commit 7eb05e2

Please sign in to comment.