Lines Matching refs:config

41 namespace config = utils::config;
49 class mock_parser : public config::parser {
56 setup(config::tree& tree, const int syntax_version) in setup()
61 tree.define< config::string_node >("top_string"); in setup()
62 tree.define< config::int_node >("inner.int"); in setup()
74 mock_parser(config::tree& tree) : in mock_parser()
75 config::parser(tree) in mock_parser()
92 config::tree tree; in ATF_TEST_CASE_BODY()
94 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
95 tree.lookup< config::string_node >("foo")); in ATF_TEST_CASE_BODY()
107 config::tree tree; in ATF_TEST_CASE_BODY()
108 ATF_REQUIRE_THROW_RE(config::syntax_error, "foo", in ATF_TEST_CASE_BODY()
124 config::tree tree; in ATF_TEST_CASE_BODY()
126 ATF_REQUIRE_EQ("foo", tree.lookup< config::string_node >("top_string")); in ATF_TEST_CASE_BODY()
127 ATF_REQUIRE_EQ(12345, tree.lookup< config::int_node >("inner.int")); in ATF_TEST_CASE_BODY()
129 tree.lookup< config::string_node >("inner.dynamic.foo")); in ATF_TEST_CASE_BODY()
131 tree.lookup< config::string_node >("inner.dynamic.bar")); in ATF_TEST_CASE_BODY()
145 config::tree tree(false); in ATF_TEST_CASE_BODY()
147 ATF_REQUIRE_EQ("baz", tree.lookup< config::string_node >("top_string")); in ATF_TEST_CASE_BODY()
159 config::tree tree1; in ATF_TEST_CASE_BODY()
160 ATF_REQUIRE_THROW_RE(config::syntax_error, in ATF_TEST_CASE_BODY()
168 config::tree tree2; in ATF_TEST_CASE_BODY()
169 ATF_REQUIRE_THROW_RE(config::syntax_error, in ATF_TEST_CASE_BODY()
178 config::tree tree; in ATF_TEST_CASE_BODY()
181 ATF_REQUIRE_THROW_RE(config::syntax_error, in ATF_TEST_CASE_BODY()
190 config::tree tree; in ATF_TEST_CASE_BODY()
196 ATF_REQUIRE_THROW_RE(config::syntax_error, "must be 'config'", in ATF_TEST_CASE_BODY()
200 ATF_REQUIRE_THROW_RE(config::syntax_error, "only takes one argument", in ATF_TEST_CASE_BODY()
208 config::tree tree; in ATF_TEST_CASE_BODY()
209 tree.define< config::int_node >("var"); in ATF_TEST_CASE_BODY()
212 ATF_REQUIRE_THROW_RE(config::syntax_error, "No syntax defined", in ATF_TEST_CASE_BODY()
222 config::tree tree; in ATF_TEST_CASE_BODY()
223 tree.define< config::int_node >("var"); in ATF_TEST_CASE_BODY()
231 ATF_REQUIRE_THROW_RE(config::syntax_error, in ATF_TEST_CASE_BODY()
235 ATF_REQUIRE_EQ(3, tree.lookup< config::int_node >("var")); in ATF_TEST_CASE_BODY()