diff options
author | alois31 <alois1@gmx-topmail.de> | 2024-10-23 15:20:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@localhost> | 2024-10-23 15:20:51 +0000 |
commit | 2734a9cf94debc6baef4e7d4d9fa28cc28f5b31d (patch) | |
tree | ba6be97cc5ac268941b1c8ac10507786a720357c /tests/unit/libutil | |
parent | 5f1344dd8aec59ce654a0fac30b1842e2e68299c (diff) | |
parent | 689eb45630a183f0fbbd8864cb7a3c7cb1704451 (diff) |
* changes:
treewide: make more settings conditionally available
libstore/build: only send overridden settings to the build hook
treewide: consistently mark overridden settings as such
Diffstat (limited to 'tests/unit/libutil')
-rw-r--r-- | tests/unit/libutil/config.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/libutil/config.cc b/tests/unit/libutil/config.cc index 1600f4ff0..b10b288c1 100644 --- a/tests/unit/libutil/config.cc +++ b/tests/unit/libutil/config.cc @@ -57,7 +57,7 @@ namespace nix { std::map<std::string, Config::SettingInfo> settings; Setting<std::string> setting{&config, value, "name-of-the-setting", "description"}; - setting.assign("value"); + setting.override("value"); config.getSettings(settings, /* overriddenOnly = */ false); const auto iter = settings.find("name-of-the-setting"); @@ -131,7 +131,7 @@ namespace nix { { std::map<std::string, Config::SettingInfo> settings; - setting.set("foo"); + setting.setDefault("foo"); ASSERT_EQ(setting.get(), "foo"); config.getSettings(settings, /* overriddenOnly = */ true); ASSERT_TRUE(settings.empty()); @@ -170,7 +170,7 @@ namespace nix { "name-of-the-setting", "description", }; - setting.assign("value"); + setting.override("value"); ASSERT_EQ(config.toJSON(), R"#({ @@ -197,7 +197,7 @@ namespace nix { true, Xp::Flakes, }; - setting.assign("value"); + setting.override("value"); ASSERT_EQ(config.toJSON(), R"#({ |