Lines Matching refs:list
27 static int len(struct kmod_list *list) in len() argument
31 kmod_list_foreach(l, list) in len()
39 struct kmod_list *list = NULL, *last; in test_list_last() local
45 list = kmod_list_append(list, v[i]); in test_list_last()
46 assert_return(len(list) == N, EXIT_FAILURE); in test_list_last()
48 last = kmod_list_last(list); in test_list_last()
59 struct kmod_list *list = NULL, *l, *p; in test_list_prev() local
64 l = kmod_list_prev(list, list); in test_list_prev()
68 list = kmod_list_append(list, v[i]); in test_list_prev()
70 l = kmod_list_prev(list, list); in test_list_prev()
73 l = list; in test_list_prev()
75 l = kmod_list_next(list, l); in test_list_prev()
76 p = kmod_list_prev(list, l); in test_list_prev()
88 struct kmod_list *list = NULL, *l; in test_list_remove_n_latest() local
94 list = kmod_list_append(list, v[i]); in test_list_remove_n_latest()
95 assert_return(len(list) == N, EXIT_FAILURE); in test_list_remove_n_latest()
97 list = kmod_list_remove_n_latest(list, M); in test_list_remove_n_latest()
98 assert_return(len(list) == N - M, EXIT_FAILURE); in test_list_remove_n_latest()
101 kmod_list_foreach (l, list) { in test_list_remove_n_latest()
114 struct kmod_list *list = NULL, *l; in test_list_remove_data() local
120 list = kmod_list_append(list, v[i]); in test_list_remove_data()
123 list = kmod_list_remove_data(list, removed); in test_list_remove_data()
124 assert_return(len(list) == N - 1, EXIT_FAILURE); in test_list_remove_data()
126 kmod_list_foreach (l, list) in test_list_remove_data()
173 struct kmod_list *list = NULL, *l; in test_list_insert_before() local
176 list = kmod_list_insert_before(list, v3); in test_list_insert_before()
177 assert_return(len(list) == 1, EXIT_FAILURE); in test_list_insert_before()
179 list = kmod_list_insert_before(list, v2); in test_list_insert_before()
180 list = kmod_list_insert_before(list, v1); in test_list_insert_before()
181 assert_return(len(list) == 3, EXIT_FAILURE); in test_list_insert_before()
183 l = list; in test_list_insert_before()
186 l = kmod_list_next(list, l); in test_list_insert_before()
190 assert_return(len(list) == 4, EXIT_FAILURE); in test_list_insert_before()
193 l = kmod_list_next(list, l); in test_list_insert_before()
196 l = kmod_list_next(list, l); in test_list_insert_before()
207 struct kmod_list *list = NULL, *l; in test_list_insert_after() local
210 list = kmod_list_insert_after(list, v1); in test_list_insert_after()
211 assert_return(len(list) == 1, EXIT_FAILURE); in test_list_insert_after()
213 list = kmod_list_insert_after(list, v3); in test_list_insert_after()
214 list = kmod_list_insert_after(list, v2); in test_list_insert_after()
215 assert_return(len(list) == 3, EXIT_FAILURE); in test_list_insert_after()
217 l = list; in test_list_insert_after()
221 assert_return(len(list) == 4, EXIT_FAILURE); in test_list_insert_after()
224 l = kmod_list_next(list, l); in test_list_insert_after()
227 l = kmod_list_next(list, l); in test_list_insert_after()
230 l = kmod_list_next(list, l); in test_list_insert_after()