From 33caaa0d202d4d6a3abd1462f3d5650e9b6d506f Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Fri, 9 Jan 2015 11:30:43 +0100 Subject: added a parent reference to XML nodes. --- test/core/XMLTest.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'test/core') diff --git a/test/core/XMLTest.cpp b/test/core/XMLTest.cpp index 124b58d..53bd28d 100644 --- a/test/core/XMLTest.cpp +++ b/test/core/XMLTest.cpp @@ -29,24 +29,24 @@ TEST(Node, testSerialize) { Manager mgr; - Rooted html{new Element{mgr, "html"}}; - Rooted head{new Element{mgr, "head"}}; + Rooted html{new Element{mgr, {nullptr}, "html"}}; + Rooted head{new Element{mgr, html, "head"}}; html->children.push_back(head); - Rooted title{new Element{mgr, "title"}}; + Rooted title{new Element{mgr, head, "title"}}; head->children.push_back(title); - title->children.push_back(new Text(mgr, "my title")); - Rooted body{new Element{mgr, "body"}}; + title->children.push_back(new Text(mgr, title, "my title")); + Rooted body{new Element{mgr, html, "body"}}; html->children.push_back(body); // This div element contains our text. Rooted div{ - new Element{mgr, "div", {{"class", "content"}, {"id", "1"}}}}; + new Element{mgr, body, "div", {{"class", "content"}, {"id", "1"}}}}; body->children.push_back(div); - Rooted p{new Element{mgr, "p"}}; + Rooted p{new Element{mgr, div, "p"}}; div->children.push_back(p); - p->children.push_back(new Text(mgr, "my text")); - Rooted p2{new Element{mgr, "p"}}; + p->children.push_back(new Text(mgr, p, "my text")); + Rooted p2{new Element{mgr, div, "p"}}; div->children.push_back(p2); - p2->children.push_back(new Text(mgr, "my text")); + p2->children.push_back(new Text(mgr, p2, "my text")); // Now this is what we expect to see: std::string expected{ -- cgit v1.2.3