Skip to content
Permalink
Browse files

improve test for QgsSettings::enumSettingValue

  • Loading branch information
3nids committed Feb 17, 2018
1 parent f112350 commit b0bc2b20c72d5a8881c6f56526b0c4d0fdd85419
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/src/core/testqgssettings.cpp
@@ -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 );
}


0 comments on commit b0bc2b2

Please sign in to comment.
You can’t perform that action at this time.