summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-01-21 22:36:13 +0100
committerMax Kellermann <max@duempel.org>2015-01-21 23:30:00 +0100
commit1c3f5517fabc264d7b37935bd37197cdd68250ba (patch)
tree509f68fe930e79bfa4c70a1cf2146a347f8acdef /test
parent10972da06030d57429dc2c86c21e37fd0aca88dc (diff)
config/Option: convert to strictly-typed enum
Diffstat (limited to 'test')
-rw-r--r--test/DumpDatabase.cxx2
-rw-r--r--test/read_conf.cxx2
-rw-r--r--test/run_filter.cxx2
-rw-r--r--test/run_output.cxx2
4 files changed, 4 insertions, 4 deletions
diff --git a/test/DumpDatabase.cxx b/test/DumpDatabase.cxx
index 95c77abbb..4c5372694 100644
--- a/test/DumpDatabase.cxx
+++ b/test/DumpDatabase.cxx
@@ -120,7 +120,7 @@ main(int argc, char **argv)
/* do it */
- const struct config_param *path = config_get_param(CONF_DB_FILE);
+ const auto *path = config_get_param(ConfigOption::DB_FILE);
config_param param("database", path != nullptr ? path->line : -1);
if (path != nullptr)
param.AddBlockParam("path", path->value.c_str(), path->line);
diff --git a/test/read_conf.cxx b/test/read_conf.cxx
index 494fd4cd4..cb3cb207e 100644
--- a/test/read_conf.cxx
+++ b/test/read_conf.cxx
@@ -46,7 +46,7 @@ int main(int argc, char **argv)
}
ConfigOption option = ParseConfigOptionName(name);
- const char *value = option != CONF_MAX
+ const char *value = option != ConfigOption::MAX
? config_get_string(option, nullptr)
: nullptr;
int ret;
diff --git a/test/run_filter.cxx b/test/run_filter.cxx
index f6a377d82..04a722f9c 100644
--- a/test/run_filter.cxx
+++ b/test/run_filter.cxx
@@ -51,7 +51,7 @@ static Filter *
load_filter(const char *name)
{
const config_param *param =
- config_find_block(CONF_AUDIO_FILTER, "name", name);
+ config_find_block(ConfigOption::AUDIO_FILTER, "name", name);
if (param == NULL) {
fprintf(stderr, "No such configured filter: %s\n", name);
return nullptr;
diff --git a/test/run_output.cxx b/test/run_output.cxx
index 2bf7e81d9..d013a9d54 100644
--- a/test/run_output.cxx
+++ b/test/run_output.cxx
@@ -62,7 +62,7 @@ static AudioOutput *
load_audio_output(EventLoop &event_loop, const char *name)
{
const config_param *param =
- config_find_block(CONF_AUDIO_OUTPUT, "name", name);
+ config_find_block(ConfigOption::AUDIO_OUTPUT, "name", name);
if (param == NULL) {
fprintf(stderr, "No such configured audio output: %s\n", name);
return nullptr;