Lines Matching +full:tcs +full:- +full:config

29 #include "utils/config/lua_module.hpp"
31 #include <atf-c++.hpp>
37 #include "utils/config/tree.ipp"
40 namespace config = utils::config;
46 /// Non-native type to use as a leaf node.
62 class custom_node : public config::typed_leaf_node< custom_type > {
66 /// \return A dynamically-allocated node.
71 new_node->_value = _value; in deep_copy()
125 config::tree tree; in ATF_TEST_CASE_BODY()
126 tree.define< config::bool_node >("top_boolean"); in ATF_TEST_CASE_BODY()
127 tree.define< config::int_node >("top_integer"); in ATF_TEST_CASE_BODY()
128 tree.define< config::string_node >("top_string"); in ATF_TEST_CASE_BODY()
132 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
140 ATF_REQUIRE_EQ(true, tree.lookup< config::bool_node >("top_boolean")); in ATF_TEST_CASE_BODY()
141 ATF_REQUIRE_EQ(12345, tree.lookup< config::int_node >("top_integer")); in ATF_TEST_CASE_BODY()
142 ATF_REQUIRE_EQ("a foo", tree.lookup< config::string_node >("top_string")); in ATF_TEST_CASE_BODY()
149 config::tree tree; in ATF_TEST_CASE_BODY()
150 tree.define< config::bool_node >("top_boolean"); in ATF_TEST_CASE_BODY()
151 tree.define< config::int_node >("top_integer"); in ATF_TEST_CASE_BODY()
155 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
166 ATF_REQUIRE_EQ(true, tree.lookup< config::bool_node >("top_boolean")); in ATF_TEST_CASE_BODY()
167 ATF_REQUIRE_EQ(8, tree.lookup< config::int_node >("top_integer")); in ATF_TEST_CASE_BODY()
174 config::tree tree; in ATF_TEST_CASE_BODY()
175 tree.define< config::int_node >("first"); in ATF_TEST_CASE_BODY()
176 tree.define< config::int_node >("second"); in ATF_TEST_CASE_BODY()
180 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
184 ATF_REQUIRE_EQ(100, tree.lookup< config::int_node >("first")); in ATF_TEST_CASE_BODY()
185 ATF_REQUIRE_EQ(200, tree.lookup< config::int_node >("second")); in ATF_TEST_CASE_BODY()
192 config::tree tree; in ATF_TEST_CASE_BODY()
193 tree.define< config::int_node >("first"); in ATF_TEST_CASE_BODY()
197 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
201 ATF_REQUIRE_EQ(200, tree.lookup< config::int_node >("first")); in ATF_TEST_CASE_BODY()
208 config::tree tree; in ATF_TEST_CASE_BODY()
209 tree.define< config::int_node >("first"); in ATF_TEST_CASE_BODY()
210 tree.set< config::int_node >("first", 100); in ATF_TEST_CASE_BODY()
214 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
218 ATF_REQUIRE_EQ(1500, tree.lookup< config::int_node >("first")); in ATF_TEST_CASE_BODY()
225 config::tree tree; in ATF_TEST_CASE_BODY()
226 tree.define< config::bool_node >("root.boolean"); in ATF_TEST_CASE_BODY()
227 tree.define< config::int_node >("root.a.integer"); in ATF_TEST_CASE_BODY()
228 tree.define< config::string_node >("root.string"); in ATF_TEST_CASE_BODY()
232 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
240 ATF_REQUIRE_EQ(true, tree.lookup< config::bool_node >("root.boolean")); in ATF_TEST_CASE_BODY()
241 ATF_REQUIRE_EQ(12345, tree.lookup< config::int_node >("root.a.integer")); in ATF_TEST_CASE_BODY()
242 ATF_REQUIRE_EQ("a foo", tree.lookup< config::string_node >("root.string")); in ATF_TEST_CASE_BODY()
249 config::tree tree; in ATF_TEST_CASE_BODY()
250 tree.define< config::int_node >("a.first"); in ATF_TEST_CASE_BODY()
251 tree.define< config::int_node >("a.second"); in ATF_TEST_CASE_BODY()
255 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
260 ATF_REQUIRE_EQ(100, tree.lookup< config::int_node >("a.first")); in ATF_TEST_CASE_BODY()
261 ATF_REQUIRE_EQ(200, tree.lookup< config::int_node >("a.second")); in ATF_TEST_CASE_BODY()
268 config::tree tree; in ATF_TEST_CASE_BODY()
269 tree.define< config::int_node >("a.first"); in ATF_TEST_CASE_BODY()
273 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
277 ATF_REQUIRE_EQ(200, tree.lookup< config::int_node >("a.first")); in ATF_TEST_CASE_BODY()
284 config::tree tree; in ATF_TEST_CASE_BODY()
285 tree.define< config::int_node >("a.first"); in ATF_TEST_CASE_BODY()
286 tree.set< config::int_node >("a.first", 100); in ATF_TEST_CASE_BODY()
290 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
294 ATF_REQUIRE_EQ(1500, tree.lookup< config::int_node >("a.first")); in ATF_TEST_CASE_BODY()
301 config::tree tree; in ATF_TEST_CASE_BODY()
306 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
316 ATF_REQUIRE_EQ("a", tree.lookup< config::string_node >("root.test")); in ATF_TEST_CASE_BODY()
317 ATF_REQUIRE_EQ("c", tree.lookup< config::string_node >("root.test2")); in ATF_TEST_CASE_BODY()
324 config::tree tree; in ATF_TEST_CASE_BODY()
328 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
334 ATF_REQUIRE_EQ("1234", tree.lookup< config::string_node >("root.key1")); in ATF_TEST_CASE_BODY()
336 tree.lookup< config::string_node >("root.a.b.key2")); in ATF_TEST_CASE_BODY()
343 config::tree tree; in ATF_TEST_CASE_BODY()
347 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
366 config::tree tree; in ATF_TEST_CASE_BODY()
367 tree.define< config::int_node >("the_key"); in ATF_TEST_CASE_BODY()
371 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
381 ATF_REQUIRE_EQ(35, tree.lookup< config::int_node >("the_key")); in ATF_TEST_CASE_BODY()
388 config::tree tree; in ATF_TEST_CASE_BODY()
395 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
408 config::tree tree; in ATF_TEST_CASE_BODY()
411 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
421 config::tree tree; in ATF_TEST_CASE_BODY()
422 tree.define< config::bool_node >("static.bool"); in ATF_TEST_CASE_BODY()
425 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
437 config::tree tree; in ATF_TEST_CASE_BODY()
438 tree.define< config::bool_node >("a.b"); in ATF_TEST_CASE_BODY()
441 config::redirect(state, tree); in ATF_TEST_CASE_BODY()
451 ATF_INIT_TEST_CASES(tcs) in ATF_INIT_TEST_CASES() argument
453 ATF_ADD_TEST_CASE(tcs, top__valid_types); in ATF_INIT_TEST_CASES()
454 ATF_ADD_TEST_CASE(tcs, top__invalid_types); in ATF_INIT_TEST_CASES()
455 ATF_ADD_TEST_CASE(tcs, top__reuse); in ATF_INIT_TEST_CASES()
456 ATF_ADD_TEST_CASE(tcs, top__reset); in ATF_INIT_TEST_CASES()
457 ATF_ADD_TEST_CASE(tcs, top__already_set_on_entry); in ATF_INIT_TEST_CASES()
459 ATF_ADD_TEST_CASE(tcs, subtree__valid_types); in ATF_INIT_TEST_CASES()
460 ATF_ADD_TEST_CASE(tcs, subtree__reuse); in ATF_INIT_TEST_CASES()
461 ATF_ADD_TEST_CASE(tcs, subtree__reset); in ATF_INIT_TEST_CASES()
462 ATF_ADD_TEST_CASE(tcs, subtree__already_set_on_entry); in ATF_INIT_TEST_CASES()
463 ATF_ADD_TEST_CASE(tcs, subtree__override_inner); in ATF_INIT_TEST_CASES()
465 ATF_ADD_TEST_CASE(tcs, dynamic_subtree__strings); in ATF_INIT_TEST_CASES()
466 ATF_ADD_TEST_CASE(tcs, dynamic_subtree__invalid_types); in ATF_INIT_TEST_CASES()
468 ATF_ADD_TEST_CASE(tcs, locals); in ATF_INIT_TEST_CASES()
469 ATF_ADD_TEST_CASE(tcs, custom_node); in ATF_INIT_TEST_CASES()
471 ATF_ADD_TEST_CASE(tcs, invalid_key); in ATF_INIT_TEST_CASES()
472 ATF_ADD_TEST_CASE(tcs, unknown_key); in ATF_INIT_TEST_CASES()
473 ATF_ADD_TEST_CASE(tcs, value_error); in ATF_INIT_TEST_CASES()