Lines Matching refs:item
241 struct foo *item; in test_nt_list_append() local
243 for (item = foo, i = 1; i <= 10; i++, item++) { in test_nt_list_append()
244 item->a = i; in test_nt_list_append()
245 item->b = i * 2; in test_nt_list_append()
246 nt_list_init(item, next); in test_nt_list_append()
248 if (item != foo) in test_nt_list_append()
249 nt_list_append(item, foo, struct foo, next); in test_nt_list_append()
253 for (item = foo, i = 1; i <= 10; i++, item = nt_list_next(item, next)) { in test_nt_list_append()
254 assert(item->a == i); in test_nt_list_append()
255 assert(item->b == i * 2); in test_nt_list_append()
260 nt_list_for_each_entry(item, foo, next) { in test_nt_list_append()
261 assert(item->a == i); in test_nt_list_append()
262 assert(item->b == i * 2); in test_nt_list_append()
273 struct foo *item; in test_nt_list_insert() local
279 for (item = &foo[1], i = 10; i > 1; i--, item++) { in test_nt_list_insert()
280 item->a = i; in test_nt_list_insert()
281 item->b = i * 2; in test_nt_list_insert()
282 nt_list_init(item, next); in test_nt_list_insert()
283 nt_list_insert(item, foo, struct foo, next); in test_nt_list_insert()
287 for (item = foo, i = 1; i <= 10; i++, item = nt_list_next(item, next)) { in test_nt_list_insert()
288 assert(item->a == i); in test_nt_list_insert()
289 assert(item->b == i * 2); in test_nt_list_insert()
294 nt_list_for_each_entry(item, foo, next) { in test_nt_list_insert()
295 assert(item->a == i); in test_nt_list_insert()
296 assert(item->b == i * 2); in test_nt_list_insert()
308 struct foo *item, *tmp; in test_nt_list_delete() local
316 for (item = foo, i = 1; i <= 10; i++, item++) { in test_nt_list_delete()
317 item->a = i; in test_nt_list_delete()
318 item->b = i * 2; in test_nt_list_delete()
319 nt_list_init(item, next); in test_nt_list_delete()
321 if (item != foo) in test_nt_list_delete()
322 nt_list_append(item, foo, struct foo, next); in test_nt_list_delete()
326 nt_list_for_each_entry(item, foo, next) { in test_nt_list_delete()
335 nt_list_for_each_entry(item, foo, next) { in test_nt_list_delete()
336 assert(item->a != 10); /* element 10 is gone now */ in test_nt_list_delete()
347 nt_list_for_each_entry(item, foo, next) { in test_nt_list_delete()
348 assert(item->a != 10); /* element 10 is gone now */ in test_nt_list_delete()
349 assert(item->a != 2); /* element 2 is gone now */ in test_nt_list_delete()
354 item = foo; in test_nt_list_delete()
358 assert(item != foo); in test_nt_list_delete()
359 assert(item->next == NULL); in test_nt_list_delete()
363 nt_list_for_each_entry_safe(item, tmp, foo, next) { in test_nt_list_delete()
364 nt_list_del(item, foo, struct foo, next); in test_nt_list_delete()
368 assert(!item); in test_nt_list_delete()