Lines Matching defs:node_
20 return std::move(node_);
27 node_.reset(new XmlNode{node_name, std::move(attributes)});
33 node_->AddChild(std::move(stanza));
36 std::unique_ptr<XmlNode> node_;
45 node_.reset(
61 node_ = XmlParser{}.Parse(R"(
71 std::unique_ptr<XmlNode> node_;
75 EXPECT_EQ("test_node", node_->name());
76 EXPECT_TRUE(node_->children().empty());
77 EXPECT_TRUE(node_->text().empty());
81 SetText(node_.get(), "foobar");
82 EXPECT_EQ("foobar", node_->text());
86 SetText(node_.get(), "foobar");
87 AppendText(node_.get(), "-baz");
88 EXPECT_EQ("foobar-baz", node_->text());
93 node_->AddChild(std::move(child));
94 EXPECT_EQ(1u, node_->children().size());
95 EXPECT_EQ("child", node_->children().front()->name());
96 EXPECT_EQ(node_.get(), GetParent(*node_->children().front().get()));
102 EXPECT_EQ(expected_attrs, node_->attributes());
104 EXPECT_FALSE(node_->GetAttribute("foo", &attr));
106 EXPECT_TRUE(node_->GetAttribute("attr1", &attr));
108 EXPECT_TRUE(node_->GetAttribute("attr2", &attr));
117 const XmlNode* node = node_->FindFirstChild("node3", false);
122 node = node_->FindFirstChild("node3", true);
127 node = node_->FindFirstChild("foo", true);
133 const XmlNode* node = node_->FindFirstChild("node2/node3", false);
138 node = node_->FindFirstChild("node2/node3", true);
143 node = node_->FindFirstChild("node1/node2/node3", false);
148 node = node_->FindFirstChild("node1/node2/node3", true);
153 node = node_->FindFirstChild("foo/node3", true);
159 auto children = node_->FindChildren("node3", false);
164 children = node_->FindChildren("node3", true);
178 auto children = node_->FindChildren("node2/node3", false);
183 children = node_->FindChildren("node2/node3", true);
190 children = node_->FindChildren("node1/node2/node3", false);
195 children = node_->FindChildren("node1/node2/node3", true);
200 children = node_->FindChildren("foo/bar", false);
203 children = node_->FindChildren("node2/baz", false);