Lines Matching refs:config
37 namespace config = utils::config;
71 class wrapped_int_node : public config::typed_leaf_node< int_wrapper > {
91 config::typed_leaf_node< int_wrapper >::value().value()); in push_lua()
103 config::typed_leaf_node< int_wrapper >::set(new_value); in set_lua()
113 config::typed_leaf_node< int_wrapper >::set(new_value); in set_string()
123 config::typed_leaf_node< int_wrapper >::value().value(); in to_string()
134 config::tree tree; in ATF_TEST_CASE_BODY()
136 tree.define< config::int_node >("var1"); in ATF_TEST_CASE_BODY()
137 tree.define< config::string_node >("var2"); in ATF_TEST_CASE_BODY()
138 tree.define< config::bool_node >("var3"); in ATF_TEST_CASE_BODY()
140 tree.set< config::int_node >("var1", 42); in ATF_TEST_CASE_BODY()
141 tree.set< config::string_node >("var2", "hello"); in ATF_TEST_CASE_BODY()
142 tree.set< config::bool_node >("var3", false); in ATF_TEST_CASE_BODY()
144 ATF_REQUIRE_EQ(42, tree.lookup< config::int_node >("var1")); in ATF_TEST_CASE_BODY()
145 ATF_REQUIRE_EQ("hello", tree.lookup< config::string_node >("var2")); in ATF_TEST_CASE_BODY()
146 ATF_REQUIRE(!tree.lookup< config::bool_node >("var3")); in ATF_TEST_CASE_BODY()
153 config::tree tree; in ATF_TEST_CASE_BODY()
155 tree.define< config::int_node >("foo.bar.1"); in ATF_TEST_CASE_BODY()
156 tree.define< config::string_node >("foo.bar.2"); in ATF_TEST_CASE_BODY()
157 tree.define< config::bool_node >("foo.3"); in ATF_TEST_CASE_BODY()
160 tree.set< config::int_node >("foo.bar.1", 42); in ATF_TEST_CASE_BODY()
161 tree.set< config::string_node >("foo.bar.2", "hello"); in ATF_TEST_CASE_BODY()
162 tree.set< config::bool_node >("foo.3", true); in ATF_TEST_CASE_BODY()
163 tree.set< config::string_node >("sub.tree.1", "bye"); in ATF_TEST_CASE_BODY()
164 tree.set< config::int_node >("sub.tree.2", 4); in ATF_TEST_CASE_BODY()
165 tree.set< config::int_node >("sub.tree.3.4", 123); in ATF_TEST_CASE_BODY()
167 ATF_REQUIRE_EQ(42, tree.lookup< config::int_node >("foo.bar.1")); in ATF_TEST_CASE_BODY()
168 ATF_REQUIRE_EQ("hello", tree.lookup< config::string_node >("foo.bar.2")); in ATF_TEST_CASE_BODY()
169 ATF_REQUIRE(tree.lookup< config::bool_node >("foo.3")); in ATF_TEST_CASE_BODY()
170 ATF_REQUIRE_EQ(4, tree.lookup< config::int_node >("sub.tree.2")); in ATF_TEST_CASE_BODY()
171 ATF_REQUIRE_EQ(123, tree.lookup< config::int_node >("sub.tree.3.4")); in ATF_TEST_CASE_BODY()
178 config::tree tree1; in ATF_TEST_CASE_BODY()
179 config::tree tree2 = tree1.deep_copy(); in ATF_TEST_CASE_BODY()
181 tree1.define< config::bool_node >("var1"); in ATF_TEST_CASE_BODY()
183 tree2.define< config::int_node >("var1"); in ATF_TEST_CASE_BODY()
190 config::tree tree1; in ATF_TEST_CASE_BODY()
191 tree1.define< config::bool_node >("this.is.a.var"); in ATF_TEST_CASE_BODY()
192 tree1.set< config::bool_node >("this.is.a.var", true); in ATF_TEST_CASE_BODY()
193 tree1.define< config::int_node >("this.is.another.var"); in ATF_TEST_CASE_BODY()
194 tree1.set< config::int_node >("this.is.another.var", 34); in ATF_TEST_CASE_BODY()
195 tree1.define< config::int_node >("and.another"); in ATF_TEST_CASE_BODY()
196 tree1.set< config::int_node >("and.another", 123); in ATF_TEST_CASE_BODY()
198 config::tree tree2 = tree1.deep_copy(); in ATF_TEST_CASE_BODY()
199 tree2.set< config::bool_node >("this.is.a.var", false); in ATF_TEST_CASE_BODY()
200 tree2.set< config::int_node >("this.is.another.var", 43); in ATF_TEST_CASE_BODY()
202 ATF_REQUIRE( tree1.lookup< config::bool_node >("this.is.a.var")); in ATF_TEST_CASE_BODY()
203 ATF_REQUIRE(!tree2.lookup< config::bool_node >("this.is.a.var")); in ATF_TEST_CASE_BODY()
205 ATF_REQUIRE_EQ(34, tree1.lookup< config::int_node >("this.is.another.var")); in ATF_TEST_CASE_BODY()
206 ATF_REQUIRE_EQ(43, tree2.lookup< config::int_node >("this.is.another.var")); in ATF_TEST_CASE_BODY()
208 ATF_REQUIRE_EQ(123, tree1.lookup< config::int_node >("and.another")); in ATF_TEST_CASE_BODY()
209 ATF_REQUIRE_EQ(123, tree2.lookup< config::int_node >("and.another")); in ATF_TEST_CASE_BODY()
216 const config::tree t1, t2; in ATF_TEST_CASE_BODY()
217 const config::tree combined = t1.combine(t2); in ATF_TEST_CASE_BODY()
219 const config::tree expected; in ATF_TEST_CASE_BODY()
225 init_tree_for_combine_test(config::tree& tree) in init_tree_for_combine_test()
227 tree.define< config::int_node >("int-node"); in init_tree_for_combine_test()
228 tree.define< config::string_node >("string-node"); in init_tree_for_combine_test()
229 tree.define< config::int_node >("unused.node"); in init_tree_for_combine_test()
230 tree.define< config::int_node >("deeper.int.node"); in init_tree_for_combine_test()
238 config::tree t1, t2; in ATF_TEST_CASE_BODY()
241 t1.set< config::int_node >("int-node", 3); in ATF_TEST_CASE_BODY()
242 t1.set< config::string_node >("string-node", "foo"); in ATF_TEST_CASE_BODY()
243 t1.set< config::int_node >("deeper.int.node", 15); in ATF_TEST_CASE_BODY()
246 const config::tree combined = t1.combine(t2); in ATF_TEST_CASE_BODY()
255 config::tree t1, t2; in ATF_TEST_CASE_BODY()
258 t2.set< config::int_node >("int-node", 3); in ATF_TEST_CASE_BODY()
259 t2.set< config::string_node >("string-node", "foo"); in ATF_TEST_CASE_BODY()
260 t2.set< config::int_node >("deeper.int.node", 15); in ATF_TEST_CASE_BODY()
263 const config::tree combined = t1.combine(t2); in ATF_TEST_CASE_BODY()
272 config::tree t1, t2; in ATF_TEST_CASE_BODY()
275 t1.set< config::int_node >("int-node", 3); in ATF_TEST_CASE_BODY()
276 t2.set< config::int_node >("int-node", 5); in ATF_TEST_CASE_BODY()
277 t1.set< config::string_node >("string-node", "foo"); in ATF_TEST_CASE_BODY()
278 t2.set< config::int_node >("deeper.int.node", 15); in ATF_TEST_CASE_BODY()
283 const config::tree combined = t1.combine(t2); in ATF_TEST_CASE_BODY()
285 config::tree expected; in ATF_TEST_CASE_BODY()
287 expected.set< config::int_node >("int-node", 5); in ATF_TEST_CASE_BODY()
288 expected.set< config::string_node >("string-node", "foo"); in ATF_TEST_CASE_BODY()
289 expected.set< config::int_node >("deeper.int.node", 15); in ATF_TEST_CASE_BODY()
300 config::tree t1; in ATF_TEST_CASE_BODY()
301 t1.define< config::int_node >("common.base1"); in ATF_TEST_CASE_BODY()
302 t1.define< config::int_node >("common.base2"); in ATF_TEST_CASE_BODY()
304 t1.define< config::int_node >("unset.base"); in ATF_TEST_CASE_BODY()
306 config::tree t2; in ATF_TEST_CASE_BODY()
307 t2.define< config::int_node >("common.base2"); in ATF_TEST_CASE_BODY()
308 t2.define< config::int_node >("common.base3"); in ATF_TEST_CASE_BODY()
310 t2.define< config::int_node >("unset.other"); in ATF_TEST_CASE_BODY()
312 t1.set< config::int_node >("common.base1", 1); in ATF_TEST_CASE_BODY()
313 t1.set< config::int_node >("common.base2", 2); in ATF_TEST_CASE_BODY()
317 t2.set< config::int_node >("common.base2", 4); in ATF_TEST_CASE_BODY()
318 t2.set< config::int_node >("common.base3", 3); in ATF_TEST_CASE_BODY()
322 config::tree combined = t1.combine(t2); in ATF_TEST_CASE_BODY()
324 config::tree expected; in ATF_TEST_CASE_BODY()
325 expected.define< config::int_node >("common.base1"); in ATF_TEST_CASE_BODY()
326 expected.define< config::int_node >("common.base2"); in ATF_TEST_CASE_BODY()
327 expected.define< config::int_node >("common.base3"); in ATF_TEST_CASE_BODY()
330 expected.define< config::int_node >("unset.base"); in ATF_TEST_CASE_BODY()
331 expected.define< config::int_node >("unset.other"); in ATF_TEST_CASE_BODY()
333 expected.set< config::int_node >("common.base1", 1); in ATF_TEST_CASE_BODY()
334 expected.set< config::int_node >("common.base2", 4); in ATF_TEST_CASE_BODY()
335 expected.set< config::int_node >("common.base3", 3); in ATF_TEST_CASE_BODY()
345 combined.set< config::int_node >("unset.base", 5); in ATF_TEST_CASE_BODY()
346 combined.set< config::int_node >("unset.other", 5); in ATF_TEST_CASE_BODY()
353 config::tree t1; in ATF_TEST_CASE_BODY()
354 t1.define< config::int_node >("inner.leaf1"); in ATF_TEST_CASE_BODY()
355 t1.set< config::int_node >("inner.leaf1", 3); in ATF_TEST_CASE_BODY()
357 config::tree t2; in ATF_TEST_CASE_BODY()
361 config::tree combined = t1.combine(t2); in ATF_TEST_CASE_BODY()
363 config::tree expected; in ATF_TEST_CASE_BODY()
379 config::tree t1; in ATF_TEST_CASE_BODY()
380 t1.define< config::int_node >("top.foo.bar"); in ATF_TEST_CASE_BODY()
382 config::tree t2; in ATF_TEST_CASE_BODY()
383 t2.define< config::int_node >("top.foo"); in ATF_TEST_CASE_BODY()
385 ATF_REQUIRE_THROW_RE(config::bad_combination_error, in ATF_TEST_CASE_BODY()
390 ATF_REQUIRE_THROW_RE(config::bad_combination_error, in ATF_TEST_CASE_BODY()
400 config::tree tree; in ATF_TEST_CASE_BODY()
402 ATF_REQUIRE_THROW(config::invalid_key_error, in ATF_TEST_CASE_BODY()
403 tree.lookup< config::int_node >(".")); in ATF_TEST_CASE_BODY()
410 config::tree tree; in ATF_TEST_CASE_BODY()
412 tree.define< config::int_node >("foo.bar"); in ATF_TEST_CASE_BODY()
413 tree.define< config::int_node >("a.b.c"); in ATF_TEST_CASE_BODY()
415 tree.set< config::int_node >("a.b.c", 123); in ATF_TEST_CASE_BODY()
416 tree.set< config::int_node >("a.d.100", 0); in ATF_TEST_CASE_BODY()
418 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
419 tree.lookup< config::int_node >("abc")); in ATF_TEST_CASE_BODY()
421 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
422 tree.lookup< config::int_node >("foo")); in ATF_TEST_CASE_BODY()
423 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
424 tree.lookup< config::int_node >("foo.bar")); in ATF_TEST_CASE_BODY()
425 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
426 tree.lookup< config::int_node >("foo.bar.baz")); in ATF_TEST_CASE_BODY()
428 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
429 tree.lookup< config::int_node >("a")); in ATF_TEST_CASE_BODY()
430 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
431 tree.lookup< config::int_node >("a.b")); in ATF_TEST_CASE_BODY()
432 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
433 tree.lookup< config::int_node >("a.c")); in ATF_TEST_CASE_BODY()
434 (void)tree.lookup< config::int_node >("a.b.c"); in ATF_TEST_CASE_BODY()
435 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
436 tree.lookup< config::int_node >("a.b.c.d")); in ATF_TEST_CASE_BODY()
437 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
438 tree.lookup< config::int_node >("a.d")); in ATF_TEST_CASE_BODY()
439 (void)tree.lookup< config::int_node >("a.d.100"); in ATF_TEST_CASE_BODY()
440 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
441 tree.lookup< config::int_node >("a.d.101")); in ATF_TEST_CASE_BODY()
442 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
443 tree.lookup< config::int_node >("a.d.100.3")); in ATF_TEST_CASE_BODY()
444 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
445 tree.lookup< config::int_node >("a.d.e")); in ATF_TEST_CASE_BODY()
452 config::tree tree; in ATF_TEST_CASE_BODY()
454 tree.define< config::int_node >("var1"); in ATF_TEST_CASE_BODY()
455 tree.define< config::string_node >("var2"); in ATF_TEST_CASE_BODY()
456 tree.define< config::bool_node >("var3"); in ATF_TEST_CASE_BODY()
458 tree.set< config::int_node >("var1", 42); in ATF_TEST_CASE_BODY()
459 tree.set< config::bool_node >("var3", false); in ATF_TEST_CASE_BODY()
470 config::tree tree; in ATF_TEST_CASE_BODY()
472 tree.define< config::int_node >("a.b.var1"); in ATF_TEST_CASE_BODY()
473 tree.define< config::string_node >("a.b.var2"); in ATF_TEST_CASE_BODY()
474 tree.define< config::bool_node >("e.var3"); in ATF_TEST_CASE_BODY()
476 tree.set< config::int_node >("a.b.var1", 42); in ATF_TEST_CASE_BODY()
477 tree.set< config::bool_node >("e.var3", false); in ATF_TEST_CASE_BODY()
498 config::tree tree; in ATF_TEST_CASE_BODY()
500 ATF_REQUIRE_THROW(config::invalid_key_error, tree.is_set(".abc")); in ATF_TEST_CASE_BODY()
507 config::tree tree; in ATF_TEST_CASE_BODY()
509 ATF_REQUIRE_THROW(config::invalid_key_error, in ATF_TEST_CASE_BODY()
510 tree.set< config::int_node >("foo.", 54)); in ATF_TEST_CASE_BODY()
517 config::tree tree; in ATF_TEST_CASE_BODY()
519 tree.define< config::int_node >("foo.bar"); in ATF_TEST_CASE_BODY()
522 ATF_REQUIRE_THROW(config::invalid_key_value, in ATF_TEST_CASE_BODY()
523 tree.set< config::int_node >("foo", 3)); in ATF_TEST_CASE_BODY()
524 ATF_REQUIRE_THROW(config::invalid_key_value, in ATF_TEST_CASE_BODY()
525 tree.set< config::int_node >("a", -10)); in ATF_TEST_CASE_BODY()
532 config::tree tree; in ATF_TEST_CASE_BODY()
534 tree.define< config::int_node >("foo.bar"); in ATF_TEST_CASE_BODY()
535 tree.define< config::int_node >("a.b.c"); in ATF_TEST_CASE_BODY()
537 tree.set< config::int_node >("a.b.c", 123); in ATF_TEST_CASE_BODY()
538 tree.set< config::string_node >("a.d.3", "foo"); in ATF_TEST_CASE_BODY()
540 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
541 tree.set< config::int_node >("abc", 2)); in ATF_TEST_CASE_BODY()
543 tree.set< config::int_node >("foo.bar", 15); in ATF_TEST_CASE_BODY()
544 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
545 tree.set< config::int_node >("foo.bar.baz", 0)); in ATF_TEST_CASE_BODY()
547 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
548 tree.set< config::int_node >("a.c", 100)); in ATF_TEST_CASE_BODY()
549 tree.set< config::int_node >("a.b.c", -3); in ATF_TEST_CASE_BODY()
550 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
551 tree.set< config::int_node >("a.b.c.d", 82)); in ATF_TEST_CASE_BODY()
552 tree.set< config::string_node >("a.d.3", "bar"); in ATF_TEST_CASE_BODY()
553 tree.set< config::string_node >("a.d.4", "bar"); in ATF_TEST_CASE_BODY()
554 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
555 tree.set< config::int_node >("a.d.4.5", 82)); in ATF_TEST_CASE_BODY()
556 tree.set< config::int_node >("a.d.5.6", 82); in ATF_TEST_CASE_BODY()
563 config::tree tree(false); in ATF_TEST_CASE_BODY()
565 tree.define< config::int_node >("foo.bar"); in ATF_TEST_CASE_BODY()
566 tree.define< config::int_node >("a.b.c"); in ATF_TEST_CASE_BODY()
568 tree.set< config::int_node >("a.b.c", 123); in ATF_TEST_CASE_BODY()
569 tree.set< config::string_node >("a.d.3", "foo"); in ATF_TEST_CASE_BODY()
571 tree.set< config::int_node >("abc", 2); in ATF_TEST_CASE_BODY()
574 tree.set< config::int_node >("foo.bar", 15); in ATF_TEST_CASE_BODY()
575 tree.set< config::int_node >("foo.bar.baz", 0); in ATF_TEST_CASE_BODY()
578 tree.set< config::int_node >("a.c", 100); in ATF_TEST_CASE_BODY()
586 config::tree tree; in ATF_TEST_CASE_BODY()
588 tree.define< config::int_node >("top.integer"); in ATF_TEST_CASE_BODY()
591 tree.set< config::int_node >("top.integer", 5); in ATF_TEST_CASE_BODY()
612 config::tree tree; in ATF_TEST_CASE_BODY()
614 tree.define< config::int_node >("top.integer"); in ATF_TEST_CASE_BODY()
629 ATF_REQUIRE_EQ(5, tree.lookup< config::int_node >("top.integer")); in ATF_TEST_CASE_BODY()
631 ATF_REQUIRE_EQ("foo", tree.lookup< config::string_node >("dynamic.first")); in ATF_TEST_CASE_BODY()
638 config::tree tree; in ATF_TEST_CASE_BODY()
640 tree.define< config::int_node >("var1"); in ATF_TEST_CASE_BODY()
641 tree.define< config::bool_node >("var3"); in ATF_TEST_CASE_BODY()
643 tree.set< config::int_node >("var1", 42); in ATF_TEST_CASE_BODY()
644 tree.set< config::bool_node >("var3", false); in ATF_TEST_CASE_BODY()
646 tree.lookup_rw< config::int_node >("var1") += 10; in ATF_TEST_CASE_BODY()
647 ATF_REQUIRE_EQ(52, tree.lookup< config::int_node >("var1")); in ATF_TEST_CASE_BODY()
648 ATF_REQUIRE(!tree.lookup< config::bool_node >("var3")); in ATF_TEST_CASE_BODY()
655 config::tree tree; in ATF_TEST_CASE_BODY()
657 tree.define< config::int_node >("var1"); in ATF_TEST_CASE_BODY()
658 tree.define< config::string_node >("b.var2"); in ATF_TEST_CASE_BODY()
659 tree.define< config::bool_node >("c.d.var3"); in ATF_TEST_CASE_BODY()
661 tree.set< config::int_node >("var1", 42); in ATF_TEST_CASE_BODY()
662 tree.set< config::string_node >("b.var2", "hello"); in ATF_TEST_CASE_BODY()
663 tree.set< config::bool_node >("c.d.var3", false); in ATF_TEST_CASE_BODY()
674 config::tree tree; in ATF_TEST_CASE_BODY()
676 ATF_REQUIRE_THROW(config::invalid_key_error, tree.lookup_string("")); in ATF_TEST_CASE_BODY()
683 config::tree tree; in ATF_TEST_CASE_BODY()
685 tree.define< config::int_node >("a.b.c"); in ATF_TEST_CASE_BODY()
687 ATF_REQUIRE_THROW(config::unknown_key_error, tree.lookup_string("a.b")); in ATF_TEST_CASE_BODY()
688 ATF_REQUIRE_THROW(config::unknown_key_error, tree.lookup_string("a.b.c.d")); in ATF_TEST_CASE_BODY()
695 config::tree tree; in ATF_TEST_CASE_BODY()
697 tree.define< config::int_node >("foo.bar.1"); in ATF_TEST_CASE_BODY()
698 tree.define< config::string_node >("foo.bar.2"); in ATF_TEST_CASE_BODY()
706 ATF_REQUIRE_EQ(42, tree.lookup< config::int_node >("foo.bar.1")); in ATF_TEST_CASE_BODY()
707 ATF_REQUIRE_EQ("hello", tree.lookup< config::string_node >("foo.bar.2")); in ATF_TEST_CASE_BODY()
708 ATF_REQUIRE_EQ("15", tree.lookup< config::string_node >("sub.tree.2")); in ATF_TEST_CASE_BODY()
709 ATF_REQUIRE_EQ("bye", tree.lookup< config::string_node >("sub.tree.3.4")); in ATF_TEST_CASE_BODY()
716 config::tree tree; in ATF_TEST_CASE_BODY()
718 ATF_REQUIRE_THROW(config::invalid_key_error, tree.set_string(".", "foo")); in ATF_TEST_CASE_BODY()
725 config::tree tree; in ATF_TEST_CASE_BODY()
727 tree.define< config::int_node >("foo.bar"); in ATF_TEST_CASE_BODY()
729 ATF_REQUIRE_THROW(config::invalid_key_value, in ATF_TEST_CASE_BODY()
731 ATF_REQUIRE_THROW(config::invalid_key_value, in ATF_TEST_CASE_BODY()
733 ATF_REQUIRE_THROW(config::invalid_key_value, in ATF_TEST_CASE_BODY()
741 config::tree tree; in ATF_TEST_CASE_BODY()
743 tree.define< config::int_node >("foo.bar"); in ATF_TEST_CASE_BODY()
744 tree.define< config::int_node >("a.b.c"); in ATF_TEST_CASE_BODY()
749 ATF_REQUIRE_THROW(config::unknown_key_error, tree.set_string("abc", "2")); in ATF_TEST_CASE_BODY()
752 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
755 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
758 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
762 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
771 config::tree tree(false); in ATF_TEST_CASE_BODY()
773 tree.define< config::int_node >("foo.bar"); in ATF_TEST_CASE_BODY()
774 tree.define< config::int_node >("a.b.c"); in ATF_TEST_CASE_BODY()
794 const config::tree tree; in ATF_TEST_CASE_BODY()
802 config::tree tree; in ATF_TEST_CASE_BODY()
804 tree.define< config::int_node >("plain"); in ATF_TEST_CASE_BODY()
805 tree.set< config::int_node >("plain", 1234); in ATF_TEST_CASE_BODY()
807 tree.define< config::int_node >("static.first"); in ATF_TEST_CASE_BODY()
808 tree.set< config::int_node >("static.first", -3); in ATF_TEST_CASE_BODY()
809 tree.define< config::string_node >("static.second"); in ATF_TEST_CASE_BODY()
810 tree.set< config::string_node >("static.second", "some text"); in ATF_TEST_CASE_BODY()
813 tree.set< config::string_node >("dynamic.first", "hello"); in ATF_TEST_CASE_BODY()
814 tree.set< config::string_node >("dynamic.second", "bye"); in ATF_TEST_CASE_BODY()
816 config::properties_map exp_properties; in ATF_TEST_CASE_BODY()
823 const config::properties_map properties = tree.all_properties(); in ATF_TEST_CASE_BODY()
831 config::tree tree; in ATF_TEST_CASE_BODY()
833 tree.define< config::int_node >("static.first"); in ATF_TEST_CASE_BODY()
834 tree.set< config::int_node >("static.first", -3); in ATF_TEST_CASE_BODY()
835 tree.define< config::string_node >("static.second"); in ATF_TEST_CASE_BODY()
839 config::properties_map exp_properties; in ATF_TEST_CASE_BODY()
842 const config::properties_map properties = tree.all_properties(); in ATF_TEST_CASE_BODY()
850 config::tree tree; in ATF_TEST_CASE_BODY()
852 tree.define< config::int_node >("root.a.b.c.first"); in ATF_TEST_CASE_BODY()
853 tree.define< config::int_node >("root.a.b.c.second"); in ATF_TEST_CASE_BODY()
854 tree.define< config::int_node >("root.a.d.first"); in ATF_TEST_CASE_BODY()
856 tree.set< config::int_node >("root.a.b.c.first", 1); in ATF_TEST_CASE_BODY()
857 tree.set< config::int_node >("root.a.b.c.second", 2); in ATF_TEST_CASE_BODY()
858 tree.set< config::int_node >("root.a.d.first", 3); in ATF_TEST_CASE_BODY()
861 config::properties_map exp_properties; in ATF_TEST_CASE_BODY()
870 config::properties_map exp_properties; in ATF_TEST_CASE_BODY()
878 config::properties_map exp_properties; in ATF_TEST_CASE_BODY()
888 config::tree tree; in ATF_TEST_CASE_BODY()
890 tree.define< config::int_node >("root.a.b.c.first"); in ATF_TEST_CASE_BODY()
891 tree.set< config::int_node >("root.a.b.c.first", 1); in ATF_TEST_CASE_BODY()
892 ATF_REQUIRE_THROW_RE(config::value_error, "Cannot export.*leaf", in ATF_TEST_CASE_BODY()
900 config::tree tree; in ATF_TEST_CASE_BODY()
902 tree.define< config::int_node >("root.a.b.c.first"); in ATF_TEST_CASE_BODY()
903 tree.define< config::int_node >("root.a.b.c.second"); in ATF_TEST_CASE_BODY()
904 tree.define< config::int_node >("root.a.d.first"); in ATF_TEST_CASE_BODY()
906 tree.set< config::int_node >("root.a.b.c.first", 1); in ATF_TEST_CASE_BODY()
907 tree.set< config::int_node >("root.a.b.c.second", 2); in ATF_TEST_CASE_BODY()
908 tree.set< config::int_node >("root.a.d.first", 3); in ATF_TEST_CASE_BODY()
910 config::properties_map exp_properties; in ATF_TEST_CASE_BODY()
921 config::tree tree; in ATF_TEST_CASE_BODY()
923 ATF_REQUIRE_THROW(config::invalid_key_error, tree.all_properties(".")); in ATF_TEST_CASE_BODY()
930 config::tree tree; in ATF_TEST_CASE_BODY()
932 tree.define< config::int_node >("root.a.b.c.first"); in ATF_TEST_CASE_BODY()
933 tree.set< config::int_node >("root.a.b.c.first", 1); in ATF_TEST_CASE_BODY()
934 tree.define< config::int_node >("root.a.b.c.unset"); in ATF_TEST_CASE_BODY()
936 ATF_REQUIRE_THROW(config::unknown_key_error, in ATF_TEST_CASE_BODY()
938 ATF_REQUIRE_THROW_RE(config::value_error, "Cannot export.*leaf", in ATF_TEST_CASE_BODY()
946 config::tree t1; in ATF_TEST_CASE_BODY()
947 config::tree t2; in ATF_TEST_CASE_BODY()
956 config::tree t1; in ATF_TEST_CASE_BODY()
957 t1.define< config::int_node >("root.a.b.c.first"); in ATF_TEST_CASE_BODY()
958 t1.set< config::int_node >("root.a.b.c.first", 1); in ATF_TEST_CASE_BODY()
959 config::tree t2 = t1; in ATF_TEST_CASE_BODY()
968 config::tree t1; in ATF_TEST_CASE_BODY()
969 t1.define< config::int_node >("root.a.b.c.first"); in ATF_TEST_CASE_BODY()
970 t1.set< config::int_node >("root.a.b.c.first", 1); in ATF_TEST_CASE_BODY()
971 config::tree t2 = t1.deep_copy(); in ATF_TEST_CASE_BODY()
980 config::tree t1, t2; in ATF_TEST_CASE_BODY()
982 t1.define< config::int_node >("root.a.b.c.first"); in ATF_TEST_CASE_BODY()
983 t1.set< config::int_node >("root.a.b.c.first", 1); in ATF_TEST_CASE_BODY()
987 t2.define< config::int_node >("root.a.b.c.first"); in ATF_TEST_CASE_BODY()
988 t2.set< config::int_node >("root.a.b.c.first", 1); in ATF_TEST_CASE_BODY()
992 t1.set< config::int_node >("root.a.b.c.first", 2); in ATF_TEST_CASE_BODY()
996 t2.set< config::int_node >("root.a.b.c.first", 2); in ATF_TEST_CASE_BODY()
1000 t1.define< config::string_node >("another.key"); in ATF_TEST_CASE_BODY()
1001 t1.set< config::string_node >("another.key", "some text"); in ATF_TEST_CASE_BODY()
1005 t2.define< config::string_node >("another.key"); in ATF_TEST_CASE_BODY()
1006 t2.set< config::string_node >("another.key", "some text"); in ATF_TEST_CASE_BODY()
1015 config::tree tree; in ATF_TEST_CASE_BODY()