Lines Matching refs:entries
47 init_entries(list_t *entries, unsigned nentries) { in init_entries() argument
51 entries[i].id = 'a' + i; in init_entries()
52 ql_elm_new(&entries[i], link); in init_entries()
57 test_entries_list(list_head_t *head, list_t *entries, unsigned nentries) { in test_entries_list() argument
61 assert_c_eq(ql_first(head)->id, entries[0].id, "Element id mismatch"); in test_entries_list()
62 assert_c_eq(ql_last(head, link)->id, entries[nentries-1].id, in test_entries_list()
67 assert_c_eq(t->id, entries[i].id, "Element id mismatch"); in test_entries_list()
73 assert_c_eq(t->id, entries[nentries-i-1].id, in test_entries_list()
79 t = ql_next(head, &entries[i], link); in test_entries_list()
80 assert_c_eq(t->id, entries[i+1].id, "Element id mismatch"); in test_entries_list()
82 assert_ptr_null(ql_next(head, &entries[nentries-1], link), in test_entries_list()
85 assert_ptr_null(ql_prev(head, &entries[0], link), "Unexpected element"); in test_entries_list()
87 t = ql_prev(head, &entries[i], link); in test_entries_list()
88 assert_c_eq(t->id, entries[i-1].id, "Element id mismatch"); in test_entries_list()
94 list_t entries[NENTRIES]; in TEST_BEGIN() local
98 init_entries(entries, sizeof(entries)/sizeof(list_t)); in TEST_BEGIN()
100 ql_tail_insert(&head, &entries[i], link); in TEST_BEGIN()
103 test_entries_list(&head, entries, NENTRIES); in TEST_BEGIN()
109 list_t entries[NENTRIES]; in TEST_BEGIN() local
113 init_entries(entries, sizeof(entries)/sizeof(list_t)); in TEST_BEGIN()
115 ql_tail_insert(&head, &entries[i], link); in TEST_BEGIN()
119 test_entries_list(&head, entries, NENTRIES-i); in TEST_BEGIN()
128 list_t entries[NENTRIES]; in TEST_BEGIN() local
132 init_entries(entries, sizeof(entries)/sizeof(list_t)); in TEST_BEGIN()
134 ql_head_insert(&head, &entries[NENTRIES-i-1], link); in TEST_BEGIN()
137 test_entries_list(&head, entries, NENTRIES); in TEST_BEGIN()
143 list_t entries[NENTRIES]; in TEST_BEGIN() local
147 init_entries(entries, sizeof(entries)/sizeof(list_t)); in TEST_BEGIN()
149 ql_head_insert(&head, &entries[NENTRIES-i-1], link); in TEST_BEGIN()
153 test_entries_list(&head, &entries[i], NENTRIES-i); in TEST_BEGIN()
162 list_t entries[8]; in TEST_BEGIN() local
166 init_entries(entries, sizeof(entries)/sizeof(list_t)); in TEST_BEGIN()
167 a = &entries[0]; in TEST_BEGIN()
168 b = &entries[1]; in TEST_BEGIN()
169 c = &entries[2]; in TEST_BEGIN()
170 d = &entries[3]; in TEST_BEGIN()
171 e = &entries[4]; in TEST_BEGIN()
172 f = &entries[5]; in TEST_BEGIN()
173 g = &entries[6]; in TEST_BEGIN()
174 h = &entries[7]; in TEST_BEGIN()
191 test_entries_list(&head, entries, sizeof(entries)/sizeof(list_t)); in TEST_BEGIN()