86 pParent->RemoveAllChildren();
87 EXPECT_FALSE(pParent->GetFirstChild());
93 pParent->AppendLastChild(p0.get());
94 pParent->AppendLastChild(p1.get());
95 pParent->AppendLastChild(p2.get());
96 pParent->AppendLastChild(p3.get());
97 pParent->RemoveAllChildren();
98 EXPECT_FALSE(pParent->GetFirstChild());
103 EXPECT_FALSE(pParent->GetNthChild(-1));
104 EXPECT_FALSE(pParent->GetNthChild(0));
110 pParent->AppendLastChild(p0.get());
111 pParent->AppendLastChild(p1.get());
112 pParent->AppendLastChild(p2.get());
113 pParent->AppendLastChild(p3.get());
114 EXPECT_FALSE(pParent->GetNthChild(-1));
115 EXPECT_EQ(p0.get(), pParent->GetNthChild(0));
116 EXPECT_EQ(p1.get(), pParent->GetNthChild(1));
117 EXPECT_EQ(p2.get(), pParent->GetNthChild(2));
118 EXPECT_EQ(p3.get(), pParent->GetNthChild(3));
119 EXPECT_FALSE(pParent->GetNthChild(4));
120 pParent->RemoveAllChildren();
127 parent->AppendFirstChild(child0.get());
128 EXPECT_EQ(child0.get(), parent->GetFirstChild());
129 parent->AppendFirstChild(child1.get());
130 EXPECT_EQ(child1.get(), parent->GetFirstChild());
131 EXPECT_EQ(child1.get(), parent->GetNthChild(0));
132 EXPECT_EQ(child0.get(), parent->GetNthChild(1));
140 parent->AppendFirstChild(child0.get());
141 parent->AppendLastChild(child1.get());
142 EXPECT_EQ(child0.get(), parent->GetFirstChild());
143 EXPECT_EQ(child1.get(), parent->GetLastChild());
144 parent->RemoveChild(child0.get());
145 EXPECT_EQ(child1.get(), parent->GetFirstChild());
146 EXPECT_EQ(child1.get(), parent->GetLastChild());
147 parent->RemoveChild(child1.get());
148 EXPECT_FALSE(parent->GetFirstChild());
149 EXPECT_FALSE(parent->GetLastChild());
151 parent->AppendFirstChild(child0.get());
152 parent->AppendLastChild(child1.get());
153 EXPECT_EQ(child0.get(), parent->GetFirstChild());
154 EXPECT_EQ(child1.get(), parent->GetLastChild());
155 parent->RemoveChild(child1.get());
156 EXPECT_EQ(child0.get(), parent->GetFirstChild());
157 EXPECT_EQ(child0.get(), parent->GetLastChild());
158 parent->RemoveChild(child0.get());
159 EXPECT_FALSE(parent->GetFirstChild());
160 EXPECT_FALSE(parent->GetLastChild());