52 int unusedData_case1 = 1;
81 "list dtor shold initiate to test_curl_llist_dtor");
96 "List size should be 1 after adding a new element");
99 "head ptr should be first entry");
102 "tail and head should be the same");
116 "the node next to head is not getting set correctly");
118 "the list tail is not getting set correctly");
132 "the node next to head is not getting set correctly");
135 "the list tail is not getting set correctly");
150 element_next = head->
next;
156 "llist size not decremented as expected");
158 "llist new head not modified properly");
161 "new head previous not set to null");
176 fail_unless(llist_size == 3,
"should be 3 list members");
180 element_next = to_remove->
next;
181 element_prev = to_remove->
prev;
184 "element previous->next is not being adjusted");
187 "element next->previous is not being adjusted");
200 element_prev = to_remove->
prev;
203 "llist tail is not being adjusted when removing tail");
217 "llist head is not NULL while the llist is empty");
219 "llist tail is not NULL while the llist is empty");
246 "Number of list elements is not as expected, Aborting");
248 "Number of list elements is not as expected, Aborting");
253 "moving element from llist didn't decrement the size");
256 "moving element to llist_destination didn't increment the size");
259 "llist head not set to null after moving the head");
262 "llist_destination head set to null after moving an element");
265 "llist_destination tail set to null after moving an element");
268 "llist_destination tail doesn't equal llist_destination head");
struct curl_llist_element case2_list
struct curl_llist_element case4_list
static CURLcode unit_setup(void)
fail_unless(llist.size==0,"list initial size should be zero")
testing llist_init case 1: list initiation : 1: list size will be 0 2: list head will be NULL 3: list...
struct curl_llist_element * tail
struct curl_llist_element case5_list
void Curl_llist_init(struct curl_llist *l, curl_llist_dtor dtor)
void Curl_llist_move(struct curl_llist *list, struct curl_llist_element *e, struct curl_llist *to_list, struct curl_llist_element *to_e)
struct curl_llist_element * element_prev
size_t Curl_llist_count(struct curl_llist *list)
static void test_curl_llist_dtor(void *key, void *value)
static struct curl_llist llist_destination
static void unit_stop(void)
struct curl_llist_element * to_remove
case 3: removing the tail with list having >=1 element 1: list size will be decremented by one ;test...
struct curl_llist_element * head
struct curl_llist_element * element_next
void Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e, void *user)
struct curl_llist_element case3_list
void Curl_llist_destroy(struct curl_llist *list, void *user)
static struct curl_llist llist
testing Curl_llist_insert_next case 1: list is empty : 1: list size will be 1 2: list head will hold ...
UNITTEST_START int * value
struct curl_llist_element case1_list
void Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e, const void *p, struct curl_llist_element *ne)
struct curl_llist_element * prev
abort_unless(head,"llist.head is NULL")
struct curl_llist_element * next
struct curl_llist_element * head
case 1: list has >1 element, removing head : 1: list size will be decremented by one 2: head will be ...