summaryrefslogtreecommitdiff
path: root/comp/cw/code/ads/ll/lltest.c
diff options
context:
space:
mode:
authorstandenboy <standenboy@seacrossedlovers.xyz>2024-04-25 08:54:44 +0100
committerstandenboy <standenboy@seacrossedlovers.xyz>2024-04-25 08:54:44 +0100
commit2e239a4ed2265f7c7dc2aabedfdb7d7b011704cb (patch)
treeacfef7d709d4e09cbc05a368b5a30047147c69cf /comp/cw/code/ads/ll/lltest.c
parentb1c4f3c2d2a567601d2cb6aee65bb0d81320dfba (diff)
dll wasn't working and prob wasn't needed so i removed it
Diffstat (limited to 'comp/cw/code/ads/ll/lltest.c')
-rw-r--r--comp/cw/code/ads/ll/lltest.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/comp/cw/code/ads/ll/lltest.c b/comp/cw/code/ads/ll/lltest.c
new file mode 100644
index 0000000..8aa6514
--- /dev/null
+++ b/comp/cw/code/ads/ll/lltest.c
@@ -0,0 +1,18 @@
+#include <stdio.h>
+
+#include "ll.h"
+
+int main(){
+ ll_t *head = llalloc();
+ llsetdata(head, "hello");
+
+ for (int i = 0; i < 3; i++){
+ ll_t *node = llalloc();
+ llsetdata(node, "hi");
+ llsetnext(head, node);
+ }
+ for (int i = 0; i < 4; i++)
+ printf("%s\n", (char *)llgetat(head, i));
+
+ llfreeall(head);
+}