Merge pull request #2685 from haukepetersen/fix_rm_legacytests
core: remove lagacy tests from clist and lifo
This commit is contained in:
commit
0a7582f863
48
core/clist.c
48
core/clist.c
@ -59,7 +59,6 @@ void clist_remove(clist_node_t **list, clist_node_t *node)
|
||||
}
|
||||
|
||||
#if ENABLE_DEBUG
|
||||
|
||||
void clist_print(clist_node_t *clist)
|
||||
{
|
||||
clist_node_t *start = clist, *node = start;
|
||||
@ -76,51 +75,4 @@ void clist_print(clist_node_t *clist)
|
||||
}
|
||||
} while (node != start);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
int main (int argc, char* argv[]) {
|
||||
clist_node_t a;
|
||||
clist_node_t b;
|
||||
clist_node_t c;
|
||||
|
||||
clist_node_t* clist = NULL;
|
||||
|
||||
a.data = 0;
|
||||
a.next = NULL;
|
||||
a.prev = NULL;
|
||||
|
||||
b.data = 1;
|
||||
b.next = NULL;
|
||||
b.prev = NULL;
|
||||
|
||||
c.data = 2;
|
||||
c.next = NULL;
|
||||
c.prev = NULL;
|
||||
|
||||
printf("adding a,b,c\n");
|
||||
clist_add(&clist,&a);
|
||||
clist_add(&clist,&b);
|
||||
clist_add(&clist,&c);
|
||||
|
||||
clist_print(clist);
|
||||
printf("\n");
|
||||
|
||||
printf("removing b...\n");
|
||||
clist_remove(&clist, &b);
|
||||
|
||||
clist_print(clist);
|
||||
printf("\n");
|
||||
|
||||
printf("removing a...\n");
|
||||
|
||||
clist_remove(&clist, &a);
|
||||
clist_print(clist);
|
||||
|
||||
printf("removing c...\n");
|
||||
|
||||
clist_remove(&clist, &c);
|
||||
clist_print(clist);
|
||||
}
|
||||
*/
|
||||
|
||||
28
core/lifo.c
28
core/lifo.c
@ -68,31 +68,3 @@ int lifo_get(int *array)
|
||||
DEBUG("lifo_get: returning %i\n", head);
|
||||
return head;
|
||||
}
|
||||
|
||||
|
||||
#ifdef WITH_MAIN
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
int array[5];
|
||||
|
||||
lifo_init(array, 4);
|
||||
|
||||
lifo_insert(array, 2);
|
||||
lifo_insert(array, 1);
|
||||
lifo_insert(array, 3);
|
||||
lifo_insert(array, 0);
|
||||
lifo_insert(array, 3);
|
||||
printf("get: %i\n", lifo_get(array));
|
||||
printf("get: %i\n", lifo_get(array));
|
||||
printf("get: %i\n", lifo_get(array));
|
||||
printf("get: %i\n", lifo_get(array));
|
||||
printf("get: %i\n", lifo_get(array));
|
||||
printf("get: %i\n", lifo_get(array));
|
||||
printf("get: %i\n", lifo_get(array));
|
||||
printf("get: %i\n", lifo_get(array));
|
||||
printf("get: %i\n", lifo_get(array));
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user