Lines Matching full:tree

29 #include "utils/config/tree.ipp"
47 /// constructors to validate that we can use it as a leaf of a tree.
70 /// Custom tree leaf type for an object without defualt constructors.
134 config::tree tree; in ATF_TEST_CASE_BODY() local
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() local
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()
158 tree.define_dynamic("sub.tree"); 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()
190 config::tree tree1; in ATF_TEST_CASE_BODY()
198 config::tree tree2 = tree1.deep_copy(); 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() argument
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()
231 tree.define_dynamic("deeper.dynamic"); in init_tree_for_combine_test()
238 config::tree t1, t2; 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()
263 const config::tree combined = t1.combine(t2); in ATF_TEST_CASE_BODY()
272 config::tree t1, t2; 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()
300 config::tree t1; in ATF_TEST_CASE_BODY()
306 config::tree t2; 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()
343 // The combined tree should have respected existing but unset nodes. Check in ATF_TEST_CASE_BODY()
353 config::tree t1; 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()
382 config::tree t2; in ATF_TEST_CASE_BODY()
386 "'top.foo' is an inner node in the base tree but a " in ATF_TEST_CASE_BODY()
387 "leaf node in the overrides tree", in ATF_TEST_CASE_BODY()
391 "'top.foo' is a leaf node in the base tree but an " in ATF_TEST_CASE_BODY()
392 "inner node in the overrides tree", in ATF_TEST_CASE_BODY()
400 config::tree tree; in ATF_TEST_CASE_BODY() local
403 tree.lookup< config::int_node >(".")); in ATF_TEST_CASE_BODY()
410 config::tree tree; in ATF_TEST_CASE_BODY() local
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()
414 tree.define_dynamic("a.d"); 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()
419 tree.lookup< config::int_node >("abc")); in ATF_TEST_CASE_BODY()
422 tree.lookup< config::int_node >("foo")); in ATF_TEST_CASE_BODY()
424 tree.lookup< config::int_node >("foo.bar")); in ATF_TEST_CASE_BODY()
426 tree.lookup< config::int_node >("foo.bar.baz")); in ATF_TEST_CASE_BODY()
429 tree.lookup< config::int_node >("a")); in ATF_TEST_CASE_BODY()
431 tree.lookup< config::int_node >("a.b")); 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()
436 tree.lookup< config::int_node >("a.b.c.d")); 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()
441 tree.lookup< config::int_node >("a.d.101")); in ATF_TEST_CASE_BODY()
443 tree.lookup< config::int_node >("a.d.100.3")); 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() local
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()
461 ATF_REQUIRE( tree.is_set("var1")); in ATF_TEST_CASE_BODY()
462 ATF_REQUIRE(!tree.is_set("var2")); in ATF_TEST_CASE_BODY()
463 ATF_REQUIRE( tree.is_set("var3")); in ATF_TEST_CASE_BODY()
470 config::tree tree; in ATF_TEST_CASE_BODY() local
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()
479 ATF_REQUIRE(!tree.is_set("a")); in ATF_TEST_CASE_BODY()
480 ATF_REQUIRE(!tree.is_set("a.b")); in ATF_TEST_CASE_BODY()
481 ATF_REQUIRE( tree.is_set("a.b.var1")); in ATF_TEST_CASE_BODY()
482 ATF_REQUIRE(!tree.is_set("a.b.var1.trailing")); in ATF_TEST_CASE_BODY()
484 ATF_REQUIRE(!tree.is_set("a")); in ATF_TEST_CASE_BODY()
485 ATF_REQUIRE(!tree.is_set("a.b")); in ATF_TEST_CASE_BODY()
486 ATF_REQUIRE(!tree.is_set("a.b.var2")); in ATF_TEST_CASE_BODY()
487 ATF_REQUIRE(!tree.is_set("a.b.var2.trailing")); in ATF_TEST_CASE_BODY()
489 ATF_REQUIRE(!tree.is_set("e")); in ATF_TEST_CASE_BODY()
490 ATF_REQUIRE( tree.is_set("e.var3")); in ATF_TEST_CASE_BODY()
491 ATF_REQUIRE(!tree.is_set("e.var3.trailing")); in ATF_TEST_CASE_BODY()
498 config::tree tree; in ATF_TEST_CASE_BODY() local
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() local
510 tree.set< config::int_node >("foo.", 54)); in ATF_TEST_CASE_BODY()
517 config::tree tree; in ATF_TEST_CASE_BODY() local
519 tree.define< config::int_node >("foo.bar"); in ATF_TEST_CASE_BODY()
520 tree.define_dynamic("a.d"); in ATF_TEST_CASE_BODY()
523 tree.set< config::int_node >("foo", 3)); 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() local
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()
536 tree.define_dynamic("a.d"); 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()
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()
545 tree.set< config::int_node >("foo.bar.baz", 0)); 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()
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()
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() local
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()
567 tree.define_dynamic("a.d"); 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()
572 ATF_REQUIRE(!tree.is_set("abc")); 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()
576 ATF_REQUIRE(!tree.is_set("foo.bar.baz")); in ATF_TEST_CASE_BODY()
578 tree.set< config::int_node >("a.c", 100); in ATF_TEST_CASE_BODY()
579 ATF_REQUIRE(!tree.is_set("a.c")); in ATF_TEST_CASE_BODY()
586 config::tree tree; in ATF_TEST_CASE_BODY() local
588 tree.define< config::int_node >("top.integer"); in ATF_TEST_CASE_BODY()
589 tree.define< wrapped_int_node >("top.custom"); in ATF_TEST_CASE_BODY()
590 tree.define_dynamic("dynamic"); in ATF_TEST_CASE_BODY()
591 tree.set< config::int_node >("top.integer", 5); in ATF_TEST_CASE_BODY()
592 tree.set< wrapped_int_node >("top.custom", int_wrapper(10)); in ATF_TEST_CASE_BODY()
593 tree.set_string("dynamic.first", "foo"); in ATF_TEST_CASE_BODY()
596 tree.push_lua("top.integer", state); in ATF_TEST_CASE_BODY()
597 tree.push_lua("top.custom", state); in ATF_TEST_CASE_BODY()
598 tree.push_lua("dynamic.first", state); in ATF_TEST_CASE_BODY()
612 config::tree tree; in ATF_TEST_CASE_BODY() local
614 tree.define< config::int_node >("top.integer"); in ATF_TEST_CASE_BODY()
615 tree.define< wrapped_int_node >("top.custom"); in ATF_TEST_CASE_BODY()
616 tree.define_dynamic("dynamic"); in ATF_TEST_CASE_BODY()
623 tree.set_lua("top.integer", state, -3); in ATF_TEST_CASE_BODY()
624 tree.set_lua("top.custom", state, -2); in ATF_TEST_CASE_BODY()
625 tree.set_lua("dynamic.first", state, -1); in ATF_TEST_CASE_BODY()
629 ATF_REQUIRE_EQ(5, tree.lookup< config::int_node >("top.integer")); in ATF_TEST_CASE_BODY()
630 ATF_REQUIRE_EQ(10, tree.lookup< wrapped_int_node >("top.custom").value()); 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() local
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() local
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()
665 ATF_REQUIRE_EQ("42", tree.lookup_string("var1")); in ATF_TEST_CASE_BODY()
666 ATF_REQUIRE_EQ("hello", tree.lookup_string("b.var2")); in ATF_TEST_CASE_BODY()
667 ATF_REQUIRE_EQ("false", tree.lookup_string("c.d.var3")); in ATF_TEST_CASE_BODY()
674 config::tree tree; in ATF_TEST_CASE_BODY() local
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() local
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() local
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()
699 tree.define_dynamic("sub.tree"); in ATF_TEST_CASE_BODY()
701 tree.set_string("foo.bar.1", "42"); in ATF_TEST_CASE_BODY()
702 tree.set_string("foo.bar.2", "hello"); in ATF_TEST_CASE_BODY()
703 tree.set_string("sub.tree.2", "15"); in ATF_TEST_CASE_BODY()
704 tree.set_string("sub.tree.3.4", "bye"); 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() local
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() local
727 tree.define< config::int_node >("foo.bar"); in ATF_TEST_CASE_BODY()
730 tree.set_string("foo", "abc")); in ATF_TEST_CASE_BODY()
732 tree.set_string("foo.bar", " -3")); in ATF_TEST_CASE_BODY()
734 tree.set_string("foo.bar", "3 ")); in ATF_TEST_CASE_BODY()
741 config::tree tree; in ATF_TEST_CASE_BODY() local
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()
745 tree.define_dynamic("a.d"); in ATF_TEST_CASE_BODY()
746 tree.set_string("a.b.c", "123"); in ATF_TEST_CASE_BODY()
747 tree.set_string("a.d.3", "foo"); in ATF_TEST_CASE_BODY()
749 ATF_REQUIRE_THROW(config::unknown_key_error, tree.set_string("abc", "2")); in ATF_TEST_CASE_BODY()
751 tree.set_string("foo.bar", "15"); in ATF_TEST_CASE_BODY()
753 tree.set_string("foo.bar.baz", "0")); in ATF_TEST_CASE_BODY()
756 tree.set_string("a.c", "100")); in ATF_TEST_CASE_BODY()
757 tree.set_string("a.b.c", "-3"); in ATF_TEST_CASE_BODY()
759 tree.set_string("a.b.c.d", "82")); in ATF_TEST_CASE_BODY()
760 tree.set_string("a.d.3", "bar"); in ATF_TEST_CASE_BODY()
761 tree.set_string("a.d.4", "bar"); in ATF_TEST_CASE_BODY()
763 tree.set_string("a.d.4.5", "82")); in ATF_TEST_CASE_BODY()
764 tree.set_string("a.d.5.6", "82"); in ATF_TEST_CASE_BODY()
771 config::tree tree(false); in ATF_TEST_CASE_BODY() local
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()
775 tree.define_dynamic("a.d"); in ATF_TEST_CASE_BODY()
776 tree.set_string("a.b.c", "123"); in ATF_TEST_CASE_BODY()
777 tree.set_string("a.d.3", "foo"); in ATF_TEST_CASE_BODY()
779 tree.set_string("abc", "2"); in ATF_TEST_CASE_BODY()
780 ATF_REQUIRE(!tree.is_set("abc")); in ATF_TEST_CASE_BODY()
782 tree.set_string("foo.bar", "15"); in ATF_TEST_CASE_BODY()
783 tree.set_string("foo.bar.baz", "0"); in ATF_TEST_CASE_BODY()
784 ATF_REQUIRE(!tree.is_set("foo.bar.baz")); in ATF_TEST_CASE_BODY()
786 tree.set_string("a.c", "100"); in ATF_TEST_CASE_BODY()
787 ATF_REQUIRE(!tree.is_set("a.c")); in ATF_TEST_CASE_BODY()
794 const config::tree tree; in ATF_TEST_CASE_BODY() local
795 ATF_REQUIRE(tree.all_properties().empty()); in ATF_TEST_CASE_BODY()
802 config::tree tree; in ATF_TEST_CASE_BODY() local
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()
812 tree.define_dynamic("dynamic"); 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()
823 const config::properties_map properties = tree.all_properties(); in ATF_TEST_CASE_BODY()
831 config::tree tree; in ATF_TEST_CASE_BODY() local
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()
837 tree.define_dynamic("dynamic"); 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() local
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()
865 ATF_REQUIRE(exp_properties == tree.all_properties("root")); in ATF_TEST_CASE_BODY()
866 ATF_REQUIRE(exp_properties == tree.all_properties("root.a")); in ATF_TEST_CASE_BODY()
873 ATF_REQUIRE(exp_properties == tree.all_properties("root.a.b")); in ATF_TEST_CASE_BODY()
874 ATF_REQUIRE(exp_properties == tree.all_properties("root.a.b.c")); in ATF_TEST_CASE_BODY()
880 ATF_REQUIRE(exp_properties == tree.all_properties("root.a.d")); in ATF_TEST_CASE_BODY()
888 config::tree tree; in ATF_TEST_CASE_BODY() local
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()
893 tree.all_properties("root.a.b.c.first")); in ATF_TEST_CASE_BODY()
900 config::tree tree; in ATF_TEST_CASE_BODY() local
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()
914 ATF_REQUIRE(exp_properties == tree.all_properties("root.a", true)); in ATF_TEST_CASE_BODY()
921 config::tree tree; in ATF_TEST_CASE_BODY() local
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() local
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()
937 tree.all_properties("root.a.b.c.first.foo")); in ATF_TEST_CASE_BODY()
939 tree.all_properties("root.a.b.c.unset")); 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()
959 config::tree t2 = t1; in ATF_TEST_CASE_BODY()
968 config::tree t1; 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()
1015 config::tree tree; in ATF_TEST_CASE_BODY() local
1017 tree.define< wrapped_int_node >("test1"); in ATF_TEST_CASE_BODY()
1018 tree.define< wrapped_int_node >("test2"); in ATF_TEST_CASE_BODY()
1019 tree.set< wrapped_int_node >("test1", int_wrapper(5)); in ATF_TEST_CASE_BODY()
1020 tree.set< wrapped_int_node >("test2", int_wrapper(10)); in ATF_TEST_CASE_BODY()
1021 const int_wrapper& test1 = tree.lookup< wrapped_int_node >("test1"); in ATF_TEST_CASE_BODY()
1023 const int_wrapper& test2 = tree.lookup< wrapped_int_node >("test2"); in ATF_TEST_CASE_BODY()