aboutsummaryrefslogtreecommitdiff
path: root/src/unittest
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-06-23 15:22:31 +0200
committerGitHub <noreply@github.com>2021-06-23 15:22:31 +0200
commitc60a146e2291f7a55a3e5fd0447bd393b063ab1c (patch)
tree7a0810ef78f43866eb899145d6afdb36d99f2720 /src/unittest
parentcec0dfcbbda1e11e5ff2f45e58ea393d0437d7c6 (diff)
downloadminetest-c60a146e2291f7a55a3e5fd0447bd393b063ab1c.tar.gz
minetest-c60a146e2291f7a55a3e5fd0447bd393b063ab1c.tar.bz2
minetest-c60a146e2291f7a55a3e5fd0447bd393b063ab1c.zip
Rework Settings to support arbitrary hierarchies (#11352)
Diffstat (limited to 'src/unittest')
-rw-r--r--src/unittest/test_map_settings_manager.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/unittest/test_map_settings_manager.cpp b/src/unittest/test_map_settings_manager.cpp
index 81ca68705..17c31fe79 100644
--- a/src/unittest/test_map_settings_manager.cpp
+++ b/src/unittest/test_map_settings_manager.cpp
@@ -148,6 +148,11 @@ void TestMapSettingsManager::testMapSettingsManager()
check_noise_params(&dummy, &script_np_factor);
}
+ // The settings manager MUST leave user settings alone
+ mgr.setMapSetting("testname", "1");
+ mgr.setMapSetting("testname", "1", true);
+ UASSERT(!Settings::getLayer(SL_GLOBAL)->exists("testname"));
+
// Now make our Params and see if the values are correctly sourced
MapgenParams *params = mgr.makeMapgenParams();
UASSERT(params->mgtype == MAPGEN_V5);