aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-01-23 09:15:39 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-01-24 10:29:18 +0100
commitc0d7b05c41cc58144d78db022212b8d4d248c9bf (patch)
treec1d5c7393bf87238182423b9fdbd41fa7badef48 /tests
parent77450003383df8469b74916a3c2d54d4b57226ff (diff)
llist: removed unused Curl_llist_move()
(and the corresponding unit test) Closes #4842
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/unit1300.c52
1 files changed, 1 insertions, 51 deletions
diff --git a/tests/unit/unit1300.c b/tests/unit/unit1300.c
index 5cfa6daf3..5d8799779 100644
--- a/tests/unit/unit1300.c
+++ b/tests/unit/unit1300.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, 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
@@ -54,7 +54,6 @@ UNITTEST_START
struct curl_llist_element case2_list;
struct curl_llist_element case3_list;
struct curl_llist_element case4_list;
- struct curl_llist_element case5_list;
struct curl_llist_element *head;
struct curl_llist_element *element_next;
struct curl_llist_element *element_prev;
@@ -216,55 +215,6 @@ UNITTEST_START
fail_unless(llist.tail == NULL,
"llist tail is not NULL while the llist is empty");
- /* @testing Curl_llist_move(struct curl_llist *,
- * struct curl_llist_element *, struct curl_llist *,
- * struct curl_llist_element *);
- */
-
- /**
- * @case 1:
- * moving head from an llist containing one element to an empty llist
- * @assumptions:
- * 1: llist size will be 0
- * 2: llist_destination size will be 1
- * 3: llist head will be NULL
- * 4: llist_destination head == llist_destination tail != NULL
- */
-
- /*
- * @setup
- * add one element to the list
- */
-
- Curl_llist_insert_next(&llist, llist.head, &unusedData_case1,
- &case5_list);
- /* necessary assertions */
-
- abort_unless(Curl_llist_count(&llist) == 1,
- "Number of list elements is not as expected, Aborting");
- abort_unless(Curl_llist_count(&llist_destination) == 0,
- "Number of list elements is not as expected, Aborting");
-
- /*actual testing code*/
- Curl_llist_move(&llist, llist.head, &llist_destination, NULL);
- fail_unless(Curl_llist_count(&llist) == 0,
- "moving element from llist didn't decrement the size");
-
- fail_unless(Curl_llist_count(&llist_destination) == 1,
- "moving element to llist_destination didn't increment the size");
-
- fail_unless(llist.head == NULL,
- "llist head not set to null after moving the head");
-
- fail_unless(llist_destination.head != NULL,
- "llist_destination head set to null after moving an element");
-
- fail_unless(llist_destination.tail != NULL,
- "llist_destination tail set to null after moving an element");
-
- fail_unless(llist_destination.tail == llist_destination.head,
- "llist_destination tail doesn't equal llist_destination head");
-
Curl_llist_destroy(&llist, NULL);
Curl_llist_destroy(&llist_destination, NULL);
}