aboutsummaryrefslogtreecommitdiff
path: root/linked_list_test.c
diff options
context:
space:
mode:
authorleiyu3 <s444814187@gmail.com>2022-09-14 17:16:22 -0400
committerleiyu3 <s444814187@gmail.com>2022-09-14 17:16:22 -0400
commit8c53a137b30ecaafb2cee4a458ac33377ef10581 (patch)
tree458d82cad78f3c028971e152e9fe9d0b537060f5 /linked_list_test.c
parente5efa02c2746a4207251daf0173b4808dd087e89 (diff)
downloadlinked_list_c-8c53a137b30ecaafb2cee4a458ac33377ef10581.tar.gz
linked_list_c-8c53a137b30ecaafb2cee4a458ac33377ef10581.zip
add test file
Diffstat (limited to 'linked_list_test.c')
-rw-r--r--linked_list_test.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/linked_list_test.c b/linked_list_test.c
new file mode 100644
index 0000000..a71a1ff
--- /dev/null
+++ b/linked_list_test.c
@@ -0,0 +1,29 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include "linked_list.h"
4
5int main(){
6
7 node* ll = malloc(sizeof(node));
8 ll->value = 1;
9 ll->next = NULL;
10
11
12 print_ll(ll);
13 reverse_ll(&ll);
14 print_ll(ll);
15 /* delete_node(&ll, 0); */
16
17 /* print_ll(ll); */
18 /* printf("The length of ll is %d\n", count_ll(ll)); */
19
20 /* delete_node(&ll, 0); */
21 /* print_ll(ll); */
22 /* printf("The length of ll is %d\n", count_ll(ll)); */
23 /* printf("%d\n", search_node(ll, 10)->value); */
24
25 /* printf("%d\n", get_value(ll, 3)); */
26
27 /* free_ll(ll); */
28 return 0;
29}