aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/unit1300.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/unit1300.c')
-rw-r--r--tests/unit/unit1300.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/unit/unit1300.c b/tests/unit/unit1300.c
index 92207011e..f4f5f2a54 100644
--- a/tests/unit/unit1300.c
+++ b/tests/unit/unit1300.c
@@ -1,3 +1,24 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
#include <stdlib.h>
#include "curl_config.h"
#include "setup.h"
@@ -128,6 +149,7 @@ UNITTEST_START
*/
head=llist->head;
+ abort_unless(head, "llist->head is NULL");
element_next = head->next;
llist_size = Curl_llist_count(llist);
@@ -137,6 +159,7 @@ UNITTEST_START
"llist size not decremented as expected");
fail_unless(llist->head == element_next,
"llist new head not modified properly");
+ abort_unless(llist->head, "llist->head is NULL");
fail_unless(llist->head->prev == NULL,
"new head previous not set to null");
@@ -153,11 +176,13 @@ UNITTEST_START
Curl_llist_insert_next(llist, llist->head, &unusedData_case3);
llist_size = Curl_llist_count(llist);
to_remove = llist->head->next;
+ abort_unless(to_remove, "to_remove is NULL");
element_next = to_remove->next;
element_prev = to_remove->prev;
Curl_llist_remove(llist, to_remove, NULL);
fail_unless(element_prev->next == element_next,
"element previous->next is not being adjusted");
+ abort_unless(element_next, "element_next is NULL");
fail_unless(element_next->prev == element_prev,
"element next->previous is not being adjusted");