Lines Matching refs:head
59 struct Curl_llist_element *head;
71 * 2: list head will be NULL
77 fail_unless(llist.head == NULL, "list head should initiate to NULL");
88 * 2: list head will hold the data "unusedData_case1"
89 * 3: list tail will be the same as list head
92 Curl_llist_insert_next(&llist, llist.head, &unusedData_case1, &case1_list);
96 /* test that the list head data holds my unusedData */
97 fail_unless(llist.head->ptr == &unusedData_case1,
98 "head ptr should be first entry");
100 fail_unless(llist.tail == llist.head,
101 "tail and head should be the same");
106 * list has 1 element, adding one element after the head
108 * 1: the element next to head should be our newly created element
112 Curl_llist_insert_next(&llist, llist.head,
114 fail_unless(llist.head->next->ptr == &unusedData_case3,
115 "the node next to head is not getting set correctly");
124 * 1: the element next to head should be our newly created element
128 Curl_llist_insert_next(&llist, llist.head,
130 fail_unless(llist.head->next->ptr == &unusedData_case2,
131 "the node next to head is not getting set correctly");
140 * list has >1 element, removing head
143 * 2: head will be the head->next
144 * 3: "new" head's previous will be NULL
147 head = llist.head;
148 abort_unless(head, "llist.head is NULL");
149 element_next = head->next;
152 Curl_llist_remove(&llist, llist.head, NULL);
156 fail_unless(llist.head == element_next,
157 "llist new head not modified properly");
158 abort_unless(llist.head, "llist.head is NULL");
159 fail_unless(llist.head->prev == NULL,
160 "new head previous not set to null");
164 * removing non head element, with list having >=2 elements
172 Curl_llist_insert_next(&llist, llist.head, &unusedData_case3,
177 to_remove = llist.head->next;
206 * removing head with list having 1 element
209 * 2: list head will be null
213 to_remove = llist.head;
215 fail_unless(llist.head == NULL,
216 "llist head is not NULL while the llist is empty");