Skip to content

Commit b0bc2b2

Browse files
committed
improve test for QgsSettings::enumSettingValue
1 parent f112350 commit b0bc2b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/src/core/testqgssettings.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ void TestQgsSettings::enumSettingValue()
4949
// enum method returns default value if current setting is incorrect
5050
QgsUnitTypes::LayoutUnit v2 = settings.enumSettingValue( QStringLiteral( "qgis/testing/my_value_for_units" ), QgsUnitTypes::LayoutMeters );
5151
QCOMPARE( v2, QgsUnitTypes::LayoutMeters );
52+
53+
settings.setValue( QStringLiteral( "qgis/testing/my_value_for_units" ), QgsUnitTypes::LayoutCentimeters );
54+
QgsUnitTypes::LayoutUnit v3 = settings.enumSettingValue( QStringLiteral( "qgis/testing/my_value_for_units" ), QgsUnitTypes::LayoutMeters );
55+
QCOMPARE( v3, QgsUnitTypes::LayoutCentimeters );
5256
}
5357

5458

0 commit comments

Comments
 (0)