Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
improve test for QgsSettings::enumSettingValue
  • Loading branch information
3nids committed Feb 17, 2018
1 parent f112350 commit b0bc2b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/src/core/testqgssettings.cpp
Expand Up @@ -49,6 +49,10 @@ void TestQgsSettings::enumSettingValue()
// enum method returns default value if current setting is incorrect
QgsUnitTypes::LayoutUnit v2 = settings.enumSettingValue( QStringLiteral( "qgis/testing/my_value_for_units" ), QgsUnitTypes::LayoutMeters );
QCOMPARE( v2, QgsUnitTypes::LayoutMeters );

settings.setValue( QStringLiteral( "qgis/testing/my_value_for_units" ), QgsUnitTypes::LayoutCentimeters );
QgsUnitTypes::LayoutUnit v3 = settings.enumSettingValue( QStringLiteral( "qgis/testing/my_value_for_units" ), QgsUnitTypes::LayoutMeters );
QCOMPARE( v3, QgsUnitTypes::LayoutCentimeters );
}


Expand Down

0 comments on commit b0bc2b2

Please sign in to comment.