aboutsummaryrefslogtreecommitdiff
path: root/tests/plugins/plugintest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/plugins/plugintest.cc')
-rw-r--r--tests/plugins/plugintest.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/plugins/plugintest.cc b/tests/plugins/plugintest.cc
index 8da15ebab..c085d3329 100644
--- a/tests/plugins/plugintest.cc
+++ b/tests/plugins/plugintest.cc
@@ -1,16 +1,21 @@
-#include "globals.hh"
+#include "config.hh"
#include "primops.hh"
using namespace nix;
-static BaseSetting<bool> settingSet{false, "setting-set",
+struct MySettings : Config
+{
+ Setting<bool> settingSet{this, false, "setting-set",
"Whether the plugin-defined setting was set"};
+};
+
+MySettings mySettings;
-static RegisterSetting rs(&settingSet);
+static GlobalConfig::Register rs(&mySettings);
static void prim_anotherNull (EvalState & state, const Pos & pos, Value ** args, Value & v)
{
- if (settingSet)
+ if (mySettings.settingSet)
mkNull(v);
else
mkBool(v, false);