aboutsummaryrefslogtreecommitdiff
path: root/linkedlist/test.c
blob: 9c138d4705fde30dad49bddaca4ac3d42cec6d50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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;
}