From 06d20fd3356898e2cfeef425c1aee1eb02c1bd5e Mon Sep 17 00:00:00 2001 From: garbeam Date: Wed, 21 Dec 2005 18:55:34 +0200 Subject: [PATCH] removed obsolete container test case --- test/Makefile | 9 +--- test/test_container.c | 109 ------------------------------------------ 2 files changed, 1 insertion(+), 117 deletions(-) delete mode 100644 test/test_container.c diff --git a/test/Makefile b/test/Makefile index 1369ea49..912695bd 100644 --- a/test/Makefile +++ b/test/Makefile @@ -7,19 +7,12 @@ CFLAGS += -I../liblitz -I../libixp -I../libwmii -I../libcext LDFLAGS += -L../liblitz -llitz -L../libixp -lixp \ -L../libwmii -lwmii -L../libcext -lcext -SRC_container = test_container.c -OBJ_container = ${SRC_container:.c=.o} - -all: test_container +all: @echo built test cases .c.o: @echo CC $< @${CC} -c ${CFLAGS} $< -test_container: ${OBJ_container} - @echo LD $@ - @${CC} -o $@ ${OBJ_container} ${LDFLAGS} - clean: rm -f test_container *.o diff --git a/test/test_container.c b/test/test_container.c deleted file mode 100644 index 090be924..00000000 --- a/test/test_container.c +++ /dev/null @@ -1,109 +0,0 @@ -/* - * (C)opyright MMIV-MMV Anselm R. Garbe - * See LICENSE file for license details. - */ - -#include -#include - -#include "cext.h" - -static void iter_print_container(void *item, void *aux) -{ - printf("%d\n", *(int *)item); -} - -int main(int argc, char *argv[]) -{ - - Container c = {0}; - int i; - - printf("--------------------------------\n"); - { - int *e = cext_emallocz(sizeof(int)); - cext_attach_item(&c, e); - cext_iterate(&c, nil, iter_print_container); - cext_detach_item(&c, e); - cext_iterate(&c, nil, iter_print_container); - } - printf("--------------------------------\n"); - - printf("--------------------------------\n"); - for (i = 0; i < 10; i++) { - int *e = cext_emallocz(sizeof(int)); - *e = i; - cext_attach_item(&c, e); - } - cext_iterate(&c, nil, iter_print_container); - printf("--------------------------------\n"); - - printf("--------------------------------\n"); - for (i = 0; i < 10; i++) { - int *e = cext_list_get_item(&c, i); - printf("%d\n", *e); - } - printf("--------------------------------\n"); - - printf("--------------------------------\n"); - { - CItem *itm = c.stack; - for (; itm; itm = itm->down) - printf("%d\n", *(int *)itm->item); - } - printf("--------------------------------\n"); - - printf("--------------------------------\n"); - { - int *e = cext_list_get_item(&c, 5); - cext_stack_top_item(&c, e); - e = cext_stack_get_top_item(&c); - printf("%d (5)\n", *e); - e = cext_stack_get_up_item(&c, cext_stack_get_top_item(&c)); - printf("%d (0)\n", *e); - e = cext_stack_get_down_item(&c, cext_stack_get_top_item(&c)); - printf("%d (9)\n", *e); - } - printf("--------------------------------\n"); - - printf("--------------------------------\n"); - { - CItem *itm = c.stack; - for (; itm; itm = itm->down) - printf("%d\n", *(int *)itm->item); - } - printf("--------------------------------\n"); - - printf("--------------------------------\n"); - { - int *e = cext_list_get_item(&c, 5); - cext_detach_item(&c, e); - cext_iterate(&c, nil, iter_print_container); - } - printf("--------------------------------\n"); - - printf("--------------------------------\n"); - { - CItem *itm = c.stack; - for (; itm; itm = itm->down) - printf("%d\n", *(int *)itm->item); - } - printf("--------------------------------\n"); - - printf("--------------------------------\n"); - { - int *e = cext_list_get_item(&c, 4); - cext_detach_item(&c, e); - cext_iterate(&c, nil, iter_print_container); - } - printf("--------------------------------\n"); - - printf("--------------------------------\n"); - { - CItem *itm = c.stack; - for (; itm; itm = itm->down) - printf("%d\n", *(int *)itm->item); - } - printf("--------------------------------\n"); - return TRUE; -}