summaryrefslogtreecommitdiff
path: root/test/shared_subtitle_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-02-09 00:29:00 +0100
committerCarl Hetherington <cth@carlh.net>2024-02-25 19:59:43 +0100
commite602f01f8a5bfca0acd730a301ffbc8a675fe5d7 (patch)
tree9a73953fd7d788c11cb959f5df39a57d67cdf5de /test/shared_subtitle_test.cc
parentb395d79069cf64fd3a552fb843a31affa57662de (diff)
Replace xmlpp::Node::add_child with cxml::add_child.no-add-child
Diffstat (limited to 'test/shared_subtitle_test.cc')
-rw-r--r--test/shared_subtitle_test.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/shared_subtitle_test.cc b/test/shared_subtitle_test.cc
index 7ac20e10..22ee7177 100644
--- a/test/shared_subtitle_test.cc
+++ b/test/shared_subtitle_test.cc
@@ -175,13 +175,13 @@ BOOST_AUTO_TEST_CASE (format_xml_test1)
{
xmlpp::Document doc;
auto root = doc.create_root_node("Foo");
- root->add_child("Empty");
- root->add_child("Text")->add_child_text("Hello world");
- root->add_child("Font")->add_child("Text")->add_child_text("Say what");
- auto fred = root->add_child("Text")->add_child("Font");
+ cxml::add_child(root, "Empty");
+ cxml::add_text_child(root, "Text", "Hello world");
+ cxml::add_text_child(cxml::add_child(root, "Font"), "Text", "Say what");
+ auto fred = cxml::add_child(cxml::add_child(root, "Text"), "Font");
fred->set_attribute("bob", "job");
fred->add_child_text("Fred");
- fred->add_child("Text")->add_child_text("Jim");
+ cxml::add_text_child(fred, "Text", "Jim");
fred->add_child_text("Sheila");
BOOST_REQUIRE_EQUAL (dcp::SubtitleAsset::format_xml(doc, make_pair(string{}, string{"fred"})),
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
@@ -210,7 +210,7 @@ BOOST_AUTO_TEST_CASE (format_xml_entities_test)
{
xmlpp::Document doc;
auto root = doc.create_root_node("Foo");
- root->add_child("Bar")->add_child_text("Don't panic &amp; xml \"is\" 'great' & < > —");
+ cxml::add_text_child(root, "Bar", "Don't panic &amp; xml \"is\" 'great' & < > —");
BOOST_REQUIRE_EQUAL(dcp::SubtitleAsset::format_xml(doc, {}),
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<Foo>\n"