[cpp-sp] branch main updated: Test more inheritance scenarios.
Scott Cantor
cantor.2 at osu.edu
Tue Nov 19 21:06:04 UTC 2024
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=2e696bfe6e08970f9d9b595cfb16042f16108676
The following commit(s) were added to refs/heads/main by this push:
new 2e696bfe Test more inheritance scenarios.
2e696bfe is described below
commit 2e696bfe6e08970f9d9b595cfb16042f16108676
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Nov 19 16:05:47 2024 -0500
Test more inheritance scenarios.
---
tests/data/util/boostpropset/tree.xml | 8 +++++---
tests/util/BoostPropertySetTests.cpp | 15 ++++++++++++---
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/tests/data/util/boostpropset/tree.xml b/tests/data/util/boostpropset/tree.xml
index 6bfae97e..60ea1d62 100644
--- a/tests/data/util/boostpropset/tree.xml
+++ b/tests/data/util/boostpropset/tree.xml
@@ -1,6 +1,8 @@
-<root foo="bar">
- <one foo="baz" />
- <one unset="foo">
+<root foo="bar" zork="frobnitz">
+ <one foo="baz">
<two />
</one>
+ <one unset="foo zork">
+ <two zork="zorkmid"/>
+ </one>
</root>
diff --git a/tests/util/BoostPropertySetTests.cpp b/tests/util/BoostPropertySetTests.cpp
index e8e9e376..6e45eb27 100644
--- a/tests/util/BoostPropertySetTests.cpp
+++ b/tests/util/BoostPropertySetTests.cpp
@@ -112,19 +112,28 @@ BOOST_FIXTURE_TEST_CASE(BoostPropertySet_tree, BPS_Fixture)
}
BOOST_CHECK_EQUAL(ones.size(), 2);
- BOOST_CHECK_EQUAL(twos.size(), 1);
+ BOOST_CHECK_EQUAL(twos.size(), 2);
BOOST_CHECK_EQUAL(rootset.getString("foo"), "bar");
+ BOOST_CHECK_EQUAL(rootset.getString("zork"), "frobnitz");
BOOST_CHECK_EQUAL(rootset.getString("<xmlattr>"), nullptr);
BOOST_CHECK_EQUAL(rootset.getString("one"), nullptr);
BOOST_CHECK_EQUAL(ones[0]->getString("foo"), "baz");
+ BOOST_CHECK_EQUAL(ones[0]->getString("zork"), "frobnitz");
BOOST_CHECK_EQUAL(ones[0]->getString("<xmlattr>"), nullptr);
+ BOOST_CHECK_EQUAL(ones[0]->getString("two"), nullptr);
BOOST_CHECK_EQUAL(ones[1]->getString("foo", "zork"), "zork");
+ BOOST_CHECK_EQUAL(ones[1]->getString("zork"), nullptr);
BOOST_CHECK_EQUAL(ones[1]->getString("<xmlattr>"), nullptr);
BOOST_CHECK_EQUAL(ones[1]->getString("two"), nullptr);
- BOOST_CHECK_EQUAL(twos[0]->getString("unset"), "foo");
- BOOST_CHECK_EQUAL(twos[0]->getString("foo"), nullptr);
+ BOOST_CHECK_EQUAL(twos[0]->getString("foo"), "baz");
+ BOOST_CHECK_EQUAL(twos[0]->getString("zork"), "frobnitz");
BOOST_CHECK_EQUAL(twos[0]->getString("<xmlattr>"), nullptr);
+
+ BOOST_CHECK_EQUAL(twos[1]->getString("unset"), "foo zork");
+ BOOST_CHECK_EQUAL(twos[1]->getString("foo"), nullptr);
+ BOOST_CHECK_EQUAL(twos[1]->getString("zork"), "zorkmid");
+ BOOST_CHECK_EQUAL(twos[1]->getString("<xmlattr>"), nullptr);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list