Lines Matching refs:parent1

104     unique_node_ptr parent1 = CreateNode(nullptr, "/path1");  in TEST_F()  local
107 unique_node_ptr child = CreateNode(parent1.get(), "subdir"); in TEST_F()
108 ASSERT_EQ(2, GetRefCount(parent1.get())); in TEST_F()
109 ASSERT_EQ(child.get(), parent1->LookupChildByName("subdir", false /* acquire */)); in TEST_F()
112 ASSERT_EQ(1, GetRefCount(parent1.get())); in TEST_F()
113 ASSERT_EQ(nullptr, parent1->LookupChildByName("subdir", false /* acquire */)); in TEST_F()
123 unique_node_ptr parent1 = CreateNode(nullptr, "/path1"); in TEST_F() local
126 unique_node_ptr child = CreateNode(parent1.get(), "subdir"); in TEST_F()
127 ASSERT_EQ(2, GetRefCount(parent1.get())); in TEST_F()
128 ASSERT_EQ(child.get(), parent1->LookupChildByName("subdir", false /* acquire */)); in TEST_F()
131 ASSERT_EQ(1, GetRefCount(parent1.get())); in TEST_F()
132 ASSERT_EQ(nullptr, parent1->LookupChildByName("subdir", false /* acquire */)); in TEST_F()
133 ASSERT_EQ(nullptr, parent1->LookupChildByName("subdir_new", false /* acquire */)); in TEST_F()
172 unique_node_ptr parent1 = CreateNode(nullptr, "/path1"); in TEST_F() local
175 unique_node_ptr child0 = CreateNode(parent1.get(), "subdir", 0 /* transforms */); in TEST_F()
176 unique_node_ptr child1 = CreateNode(parent1.get(), "subdir", 1 /* transforms */); in TEST_F()
177 ASSERT_EQ(3, GetRefCount(parent1.get())); in TEST_F()
179 parent1->LookupChildByName("subdir", false /* acquire */, 0 /* transforms */)); in TEST_F()
181 parent1->LookupChildByName("subdir", false /* acquire */, 1 /* transforms */)); in TEST_F()
183 parent1->RenameChild("subdir", "subdir", parent2.get()); in TEST_F()
184 ASSERT_EQ(1, GetRefCount(parent1.get())); in TEST_F()
186 parent1->LookupChildByName("subdir", false /* acquire */, 0 /* transforms */)); in TEST_F()
188 parent1->LookupChildByName("subdir", false /* acquire */, 1 /* transforms */)); in TEST_F()
203 unique_node_ptr parent1 = CreateNode(nullptr, "/path1"); in TEST_F() local
206 unique_node_ptr child0 = CreateNode(parent1.get(), "subdir", 0 /* transforms */); in TEST_F()
207 unique_node_ptr child1 = CreateNode(parent1.get(), "subdir", 1 /* transforms */); in TEST_F()
208 ASSERT_EQ(3, GetRefCount(parent1.get())); in TEST_F()
210 parent1->LookupChildByName("subdir", false /* acquire */, 0 /* transforms */)); in TEST_F()
212 parent1->LookupChildByName("subdir", false /* acquire */, 1 /* transforms */)); in TEST_F()
214 parent1->RenameChild("subdir", "subdir_new", parent2.get()); in TEST_F()
215 ASSERT_EQ(1, GetRefCount(parent1.get())); in TEST_F()
217 parent1->LookupChildByName("subdir", false /* acquire */, 0 /* transforms */)); in TEST_F()
219 parent1->LookupChildByName("subdir_new", false /* acquire */, 0 /* transforms */)); in TEST_F()
221 parent1->LookupChildByName("subdir", false /* acquire */, 1 /* transforms */)); in TEST_F()
223 parent1->LookupChildByName("subdir_new", false /* acquire */, 1 /* transforms */)); in TEST_F()
227 parent1->LookupChildByName("subdir_new", false /* acquire */, 0 /* transforms */)); in TEST_F()
229 parent1->LookupChildByName("subdir_new", false /* acquire */, 1 /* transforms */)); in TEST_F()