summaryrefslogtreecommitdiff
path: root/lib/llist.c
diff options
context:
space:
mode:
authorAmr Shahin <amrnablus@gmail.com>2011-06-19 03:27:22 +0300
committerDaniel Stenberg <daniel@haxx.se>2011-06-19 22:22:49 +0200
commitc9f16e67eff98c8c6a3e6ff32927af8c002ac2d8 (patch)
treebd8fab4287ee6436826a31100d9649a4c54f775b /lib/llist.c
parentf851f768578dc096c561d57ba07ffd1004d504c0 (diff)
downloadcurl-c9f16e67eff98c8c6a3e6ff32927af8c002ac2d8.tar.gz
unitteset: Curl_llist_move
adding unit test for Curl_llist_move, documenting unit-tested functions in llist.c, changing unit-test to unittest, replacing assert calls with abort_unless calls
Diffstat (limited to 'lib/llist.c')
-rw-r--r--lib/llist.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/llist.c b/lib/llist.c
index 9478a708d..8b4bc7f20 100644
--- a/lib/llist.c
+++ b/lib/llist.c
@@ -31,6 +31,9 @@
/* this must be the last include file */
#include "memdebug.h"
+/*
+ * @unittest: 1300
+ */
static void
llist_init(struct curl_llist *l, curl_llist_dtor dtor)
{
@@ -106,8 +109,9 @@ Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e,
/*
* @unittest: 1300
*/
-int Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e,
- void *user)
+int
+Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e,
+ void *user)
{
if(e == NULL || list->size == 0)
return 1;
@@ -153,6 +157,9 @@ Curl_llist_count(struct curl_llist *list)
return list->size;
}
+/*
+ * @unittest: 1300
+ */
int Curl_llist_move(struct curl_llist *list, struct curl_llist_element *e,
struct curl_llist *to_list,
struct curl_llist_element *to_e)