aboutsummaryrefslogtreecommitdiff
path: root/linkedlist/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'linkedlist/test.c')
-rw-r--r--linkedlist/test.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/linkedlist/test.c b/linkedlist/test.c
new file mode 100644
index 0000000..9c138d4
--- /dev/null
+++ b/linkedlist/test.c
@@ -0,0 +1,28 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "list.h"
+
+int main(void)
+{
+ struct list* listroot = malloc(sizeof(*listroot));
+
+ list_init(&listroot);
+
+ for(int i = 0; i < 30; i++)
+ {
+ list_add(i, &listroot);
+ }
+
+ printf("list created, printing\n");
+
+ for(int i = 0; i < 30; i++)
+ {
+ printf("Round %i, ", i);
+ printf("Element %i\n", list_get(i, &listroot));
+ }
+
+ printf("\n");
+
+ return 0;
+}