MXS-2304 Add contains() to test if a parameter exists
Replaces uses of config_get_param() in modules either with contains() or get_string(). The config_get_param() is moved to internal headers, as it allows seeing inside a config setting.
This commit is contained in:
@ -179,7 +179,7 @@ int test_add_parameter()
|
||||
|
||||
TEST(ctx.parameters->get_integer("p1") == -321);
|
||||
TEST(ctx.parameters->get_integer("p2") == 321);
|
||||
TEST(config_get_param(ctx.parameters, "p3") && ctx.parameters->get_bool("p3") == false);
|
||||
TEST(ctx.parameters->contains("p3") && ctx.parameters->get_bool("p3") == false);
|
||||
TEST(ctx.parameters->get_string("p4") == "strange");
|
||||
int val = ctx.parameters->get_enum("p5", enum_values);
|
||||
TEST(val == 5);
|
||||
|
||||
Reference in New Issue
Block a user