BCI-base/test/test_stack.c

30 lines
403 B
C
Raw Normal View History

2018-09-26 16:22:36 +00:00
#include <stdio.h>
#include "../stack.h"
int main(void)
{
bci_stack_t stack = NULL;
int i;
uint16_t res;
char status = 0;
for(i = 0; i < 10; i++)
{
bci_stack_t_push(&stack, (uint16_t) i);
}
while(!status)
{
status = bci_stack_t_pop(&stack, &res);
printf("%d\n", res);
}
for(i = 0; i < 10; i++)
{
bci_stack_t_push(&stack, (uint16_t) i);
}
bci_stack_t_del(&stack);
return 0;
}