Lines Matching refs:entries
47 init_entries(list_t *entries, unsigned nentries) in init_entries() argument
52 entries[i].id = 'a' + i; in init_entries()
53 ql_elm_new(&entries[i], link); in init_entries()
58 test_entries_list(list_head_t *head, list_t *entries, unsigned nentries) in test_entries_list() argument
63 assert_c_eq(ql_first(head)->id, entries[0].id, "Element id mismatch"); in test_entries_list()
64 assert_c_eq(ql_last(head, link)->id, entries[nentries-1].id, in test_entries_list()
69 assert_c_eq(t->id, entries[i].id, "Element id mismatch"); in test_entries_list()
75 assert_c_eq(t->id, entries[nentries-i-1].id, in test_entries_list()
81 t = ql_next(head, &entries[i], link); in test_entries_list()
82 assert_c_eq(t->id, entries[i+1].id, "Element id mismatch"); in test_entries_list()
84 assert_ptr_null(ql_next(head, &entries[nentries-1], link), in test_entries_list()
87 assert_ptr_null(ql_prev(head, &entries[0], link), "Unexpected element"); in test_entries_list()
89 t = ql_prev(head, &entries[i], link); in test_entries_list()
90 assert_c_eq(t->id, entries[i-1].id, "Element id mismatch"); in test_entries_list()
97 list_t entries[NENTRIES]; in TEST_BEGIN() local
101 init_entries(entries, sizeof(entries)/sizeof(list_t)); in TEST_BEGIN()
103 ql_tail_insert(&head, &entries[i], link); in TEST_BEGIN()
105 test_entries_list(&head, entries, NENTRIES); in TEST_BEGIN()
112 list_t entries[NENTRIES]; in TEST_BEGIN() local
116 init_entries(entries, sizeof(entries)/sizeof(list_t)); in TEST_BEGIN()
118 ql_tail_insert(&head, &entries[i], link); in TEST_BEGIN()
121 test_entries_list(&head, entries, NENTRIES-i); in TEST_BEGIN()
131 list_t entries[NENTRIES]; in TEST_BEGIN() local
135 init_entries(entries, sizeof(entries)/sizeof(list_t)); in TEST_BEGIN()
137 ql_head_insert(&head, &entries[NENTRIES-i-1], link); in TEST_BEGIN()
139 test_entries_list(&head, entries, NENTRIES); in TEST_BEGIN()
146 list_t entries[NENTRIES]; in TEST_BEGIN() local
150 init_entries(entries, sizeof(entries)/sizeof(list_t)); in TEST_BEGIN()
152 ql_head_insert(&head, &entries[NENTRIES-i-1], link); in TEST_BEGIN()
155 test_entries_list(&head, &entries[i], NENTRIES-i); in TEST_BEGIN()
165 list_t entries[8]; in TEST_BEGIN() local
169 init_entries(entries, sizeof(entries)/sizeof(list_t)); in TEST_BEGIN()
170 a = &entries[0]; in TEST_BEGIN()
171 b = &entries[1]; in TEST_BEGIN()
172 c = &entries[2]; in TEST_BEGIN()
173 d = &entries[3]; in TEST_BEGIN()
174 e = &entries[4]; in TEST_BEGIN()
175 f = &entries[5]; in TEST_BEGIN()
176 g = &entries[6]; in TEST_BEGIN()
177 h = &entries[7]; in TEST_BEGIN()
194 test_entries_list(&head, entries, sizeof(entries)/sizeof(list_t)); in TEST_BEGIN()