Lines Matching refs:list
37 void ExpectListContentsForDirection(const LinkedList<Node>& list, in ExpectListContentsForDirection() argument
40 for (const LinkNode<Node>* node = (forward ? list.head() : list.tail()); in ExpectListContentsForDirection()
41 node != list.end(); in ExpectListContentsForDirection()
51 void ExpectListContents(const LinkedList<Node>& list, in ExpectListContents() argument
56 ExpectListContentsForDirection(list, num_nodes, node_ids, true); in ExpectListContents()
60 ExpectListContentsForDirection(list, num_nodes, node_ids, false); in ExpectListContents()
65 LinkedList<Node> list; in TEST() local
66 EXPECT_EQ(list.end(), list.head()); in TEST()
67 EXPECT_EQ(list.end(), list.tail()); in TEST()
68 ExpectListContents(list, 0, NULL); in TEST()
72 LinkedList<Node> list; in TEST() local
73 ExpectListContents(list, 0, NULL); in TEST()
76 list.Append(&n1); in TEST()
78 EXPECT_EQ(&n1, list.head()); in TEST()
79 EXPECT_EQ(&n1, list.tail()); in TEST()
82 ExpectListContents(list, arraysize(expected), expected); in TEST()
86 list.Append(&n2); in TEST()
88 EXPECT_EQ(&n1, list.head()); in TEST()
89 EXPECT_EQ(&n2, list.tail()); in TEST()
92 ExpectListContents(list, arraysize(expected), expected); in TEST()
96 list.Append(&n3); in TEST()
98 EXPECT_EQ(&n1, list.head()); in TEST()
99 EXPECT_EQ(&n3, list.tail()); in TEST()
102 ExpectListContents(list, arraysize(expected), expected); in TEST()
107 LinkedList<Node> list; in TEST() local
115 list.Append(&n1); in TEST()
116 list.Append(&n2); in TEST()
117 list.Append(&n3); in TEST()
118 list.Append(&n4); in TEST()
119 list.Append(&n5); in TEST()
121 EXPECT_EQ(&n1, list.head()); in TEST()
122 EXPECT_EQ(&n5, list.tail()); in TEST()
125 ExpectListContents(list, arraysize(expected), expected); in TEST()
131 EXPECT_EQ(&n1, list.head()); in TEST()
132 EXPECT_EQ(&n5, list.tail()); in TEST()
135 ExpectListContents(list, arraysize(expected), expected); in TEST()
141 EXPECT_EQ(&n1, list.head()); in TEST()
142 EXPECT_EQ(&n4, list.tail()); in TEST()
145 ExpectListContents(list, arraysize(expected), expected); in TEST()
151 EXPECT_EQ(&n2, list.head()); in TEST()
152 EXPECT_EQ(&n4, list.tail()); in TEST()
155 ExpectListContents(list, arraysize(expected), expected); in TEST()
162 ExpectListContents(list, 0, NULL); in TEST()
163 EXPECT_EQ(list.end(), list.head()); in TEST()
164 EXPECT_EQ(list.end(), list.tail()); in TEST()
167 list.Append(&n1); in TEST()
168 list.Append(&n2); in TEST()
169 list.Append(&n3); in TEST()
170 list.Append(&n4); in TEST()
171 list.Append(&n5); in TEST()
173 EXPECT_EQ(&n1, list.head()); in TEST()
174 EXPECT_EQ(&n5, list.tail()); in TEST()
177 ExpectListContents(list, arraysize(expected), expected); in TEST()
182 LinkedList<Node> list; in TEST() local
189 list.Append(&n1); in TEST()
190 list.Append(&n2); in TEST()
192 EXPECT_EQ(&n1, list.head()); in TEST()
193 EXPECT_EQ(&n2, list.tail()); in TEST()
196 ExpectListContents(list, arraysize(expected), expected); in TEST()
201 EXPECT_EQ(&n1, list.head()); in TEST()
202 EXPECT_EQ(&n2, list.tail()); in TEST()
205 ExpectListContents(list, arraysize(expected), expected); in TEST()
210 EXPECT_EQ(&n4, list.head()); in TEST()
211 EXPECT_EQ(&n2, list.tail()); in TEST()
214 ExpectListContents(list, arraysize(expected), expected); in TEST()
219 LinkedList<Node> list; in TEST() local
226 list.Append(&n1); in TEST()
227 list.Append(&n2); in TEST()
229 EXPECT_EQ(&n1, list.head()); in TEST()
230 EXPECT_EQ(&n2, list.tail()); in TEST()
233 ExpectListContents(list, arraysize(expected), expected); in TEST()
238 EXPECT_EQ(&n1, list.head()); in TEST()
239 EXPECT_EQ(&n3, list.tail()); in TEST()
242 ExpectListContents(list, arraysize(expected), expected); in TEST()
247 EXPECT_EQ(&n1, list.head()); in TEST()
248 EXPECT_EQ(&n3, list.tail()); in TEST()
251 ExpectListContents(list, arraysize(expected), expected); in TEST()