From e602f01f8a5bfca0acd730a301ffbc8a675fe5d7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 9 Feb 2024 00:29:00 +0100 Subject: Replace xmlpp::Node::add_child with cxml::add_child. --- test/shared_subtitle_test.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test') 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"})), "\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 & xml \"is\" 'great' & < > —"); + cxml::add_text_child(root, "Bar", "Don't panic & xml \"is\" 'great' & < > —"); BOOST_REQUIRE_EQUAL(dcp::SubtitleAsset::format_xml(doc, {}), "\n" "\n" -- cgit v1.2.3