summaryrefslogtreecommitdiffstats
path: root/04_exercise/arena/arena_test.c
blob: b0927f1f2cecb1d13cd3e604f8beb1f1e4d6565b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//
// Created by stefan on 10.06.20.
//
#include "arena_list.h"
#include <stdio.h>
int main() {
    Node arena[5];
    ArenaList al = alInit(arena, 5);
    int data[5] = {1, 2, 3, 4, 5};
    for (int i = 0; i < 5; ++i) {
        alPush(&al, &data[4 - i]);
    }

    for (Node *cur = al.activeList.first; cur != NULL; cur = cur->next) {
        printf("Got digit %d \n", *(int *)cur->value);
    }

}