char *test_linked_list_delete() { int length = LL_length(head); // Deleting the last node LL_delete(&head, val3); test_assert(LL_length(head) == (length - 1), "Wrong length after deletion"); struct ll_node *last = LL_last(head); test_assert(last->val != val3, "linked list last node has wrong val after deletion"); // Deleting the head node LL_delete(&head, val4); test_assert(LL_length(head) == (length - 2), "Wrong length after deletion"); test_assert(head->val != val4, "linked list head node has wrong val after deletion"); return NULL; }
void DeleteErrorHandlerStack(void * par) { if(ErrorHandlerStack) { LL_delete(ErrorHandlerStack); ErrorHandlerStack=0; } return; }
void DeleteErrorStack(void * par) { if(ErrorStack) { while(ErrorStack->itemcount) DeleteError((Error *)LL_pop(ErrorStack)); LL_delete(ErrorStack); ErrorStack=0; } return; }