Lines Matching full:tree
37 #include "utils/config/tree.ipp"
50 /// Initializes the tree keys before reading the file.
52 /// \param [in,out] tree The tree in which to define the key structure.
56 setup(config::tree& tree, const int syntax_version) in setup() argument
61 tree.define< config::string_node >("top_string"); in setup()
62 tree.define< config::int_node >("inner.int"); in setup()
63 tree.define_dynamic("inner.dynamic"); in setup()
73 /// \param tree The mock config tree to parse.
74 mock_parser(config::tree& tree) : in mock_parser() argument
75 config::parser(tree) in mock_parser()
92 config::tree tree; in ATF_TEST_CASE_BODY() local
93 mock_parser(tree).parse(fs::path("output.lua")); 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() local
109 mock_parser(tree).parse(fs::path("output.lua"))); in ATF_TEST_CASE_BODY()
124 config::tree tree; in ATF_TEST_CASE_BODY() local
125 mock_parser(tree).parse(fs::path("output.lua")); 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() local
146 mock_parser(tree).parse(fs::path("output.lua")); in ATF_TEST_CASE_BODY()
147 ATF_REQUIRE_EQ("baz", tree.lookup< config::string_node >("top_string")); in ATF_TEST_CASE_BODY()
148 ATF_REQUIRE(!tree.is_set("unknown_string")); in ATF_TEST_CASE_BODY()
159 config::tree tree1; in ATF_TEST_CASE_BODY()
168 config::tree tree2; in ATF_TEST_CASE_BODY()
178 config::tree tree; in ATF_TEST_CASE_BODY() local
183 mock_parser(tree).parse(fs::path("output.lua"))); in ATF_TEST_CASE_BODY()
190 config::tree tree; in ATF_TEST_CASE_BODY() local
193 (void)mock_parser(tree).parse(fs::path("output.lua")); in ATF_TEST_CASE_BODY()
197 mock_parser(tree).parse(fs::path("output.lua"))); in ATF_TEST_CASE_BODY()
201 mock_parser(tree).parse(fs::path("output.lua"))); in ATF_TEST_CASE_BODY()
208 config::tree tree; in ATF_TEST_CASE_BODY() local
209 tree.define< config::int_node >("var"); in ATF_TEST_CASE_BODY()
213 mock_parser(tree).parse(fs::path("output.lua"))); in ATF_TEST_CASE_BODY()
215 ATF_REQUIRE(!tree.is_set("var")); in ATF_TEST_CASE_BODY()
222 config::tree tree; in ATF_TEST_CASE_BODY() local
223 tree.define< config::int_node >("var"); in ATF_TEST_CASE_BODY()
233 mock_parser(tree).parse(fs::path("output.lua"))); in ATF_TEST_CASE_BODY()
235 ATF_REQUIRE_EQ(3, tree.lookup< config::int_node >("var")); in ATF_TEST_CASE_BODY()