aboutsummaryrefslogtreecommitdiff
path: root/test/common/PropertyTreeTest.cpp
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-09-03 12:42:10 +0800
committerYuqian Yang <crupest@crupest.life>2025-09-03 12:42:10 +0800
commitefa1266f10e90c0c46f47cc06645422142cb2d9f (patch)
tree3d8cfefb81ce4645d150c08fc52ad646b6da80e2 /test/common/PropertyTreeTest.cpp
parent5e59a8e38c9f8992e6ffd9dbbde11e1f873780e1 (diff)
downloadcru-efa1266f10e90c0c46f47cc06645422142cb2d9f.tar.gz
cru-efa1266f10e90c0c46f47cc06645422142cb2d9f.tar.bz2
cru-efa1266f10e90c0c46f47cc06645422142cb2d9f.zip
common -> base in test dir.
Diffstat (limited to 'test/common/PropertyTreeTest.cpp')
-rw-r--r--test/common/PropertyTreeTest.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/test/common/PropertyTreeTest.cpp b/test/common/PropertyTreeTest.cpp
deleted file mode 100644
index 24d7ca9e..00000000
--- a/test/common/PropertyTreeTest.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "cru/base/PropertyTree.h"
-
-#include <catch2/catch_test_macros.hpp>
-
-TEST_CASE("PropertyTree", "[property_tree]") {
- using cru::PropertySubTreeRef;
- using cru::PropertyTree;
-
- PropertyTree tree({
- {u"k1", u"v1"},
- {u"k2", u"v2"},
- {u"k3.sub", u"v3"},
- });
-
- REQUIRE(tree.GetValue(u"k1") == u"v1");
- REQUIRE(tree.GetValue(u"k2") == u"v2");
- REQUIRE(tree.GetValue(u"k3.sub") == u"v3");
-
- PropertySubTreeRef sub_tree = tree.GetSubTreeRef(u"k3");
- REQUIRE(sub_tree.GetValue(u"sub") == u"v3");
-
- PropertySubTreeRef root_tree = sub_tree.GetParent();
- REQUIRE(root_tree.GetValue(u"k1") == u"v1");
- REQUIRE(root_tree.GetValue(u"k2") == u"v2");
- REQUIRE(root_tree.GetValue(u"k3.sub") == u"v3");
-}