From 648406a99aa281588ea5326f8f99b215ee7614fc Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 9 May 2020 16:11:11 +0200 Subject: [PATCH] Update tests as per new checks --- tests/Makefile | 2 +- tests/fail-no-oplist.c | 59 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 56 insertions(+), 5 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index e4bba055..ad566572 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -83,7 +83,7 @@ checkfail: fail-no-oplist # TODO: should grep failure message? fail-no-oplist: - for i in 1 2 3 4 5 6 7 8 9 ; do \ + for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ; do \ if $(CC) $(CFLAGS) $(CPPFLAGS) -g -c fail-no-oplist.c -o tmp.o -DTEST=$$i 2> fail-no-oplist-$$i.log ; then echo FAILURE: fail-no-oplist-$$i ; false; else echo OK: fail-no-oplist-$$i ; fi \ done diff --git a/tests/fail-no-oplist.c b/tests/fail-no-oplist.c index cec33d97..58e92e18 100644 --- a/tests/fail-no-oplist.c +++ b/tests/fail-no-oplist.c @@ -30,10 +30,15 @@ LIST_DEF(list, int, DEFAULT_OPLIST) #elif TEST == 5 +#include "m-list.h" +LIST_DUAL_PUSH_DEF(list, int, DEFAULT_OPLIST) + +#elif TEST == 6 + #include "m-deque.h" DEQUE_DEF(deque, int, DEFAULT_OPLIST) -#elif TEST == 6 +#elif TEST == 7 #include "m-i-list.h" typedef struct tmp_str_s { @@ -42,7 +47,7 @@ typedef struct tmp_str_s { } tmp_str_t; ILIST_DEF(tmpstr, tmp_str_t, DEFAULT_OPLIST) -#elif TEST == 7 +#elif TEST == 8 #include "m-string.h" void f(void) @@ -51,7 +56,7 @@ void f(void) } } -#elif TEST == 8 +#elif TEST == 9 #include "m-string.h" typedef string_t my_type; @@ -62,7 +67,7 @@ void f(void) } } -#elif TEST == 9 +#elif TEST == 10 void f(void) { @@ -70,6 +75,52 @@ void f(void) } } +#elif TEST == 11 + +#include "m-algo.h" +#include "m-array.h" + +ARRAY_DEF(array, int) +ALGO_DEF(array, M_ARRAY_OPLIST(array)) + +#elif TEST == 12 + +#include "m-algo.h" +#include "m-array.h" + +ARRAY_DEF(array, int) +ALGO_DEF(array, (OPLIST(array))) + +#elif TEST == 13 + +#include "m-bptree.h" + +BPTREE_DEF2(tree, 4, int, M_DEFAULT_OPLIST, int, DEFAULT_OPLIST) + +#elif TEST == 14 + +#include "m-bptree.h" + +BPTREE_DEF2(tree, 4, int, DEFAULT_OPLIST, int, M_DEFAULT_OPLIST) + +#elif TEST == 15 + +#include "m-bptree.h" + +BPTREE_DEF(tree, 4, int, DEFAULT_OPLIST) + +#elif TEST == 16 + +#include "m-bptree.h" + +BPTREE_MULTI_DEF2(tree, 4, int, DEFAULT_OPLIST, int, M_DEFAULT_OPLIST) + +#elif TEST == 17 + +#include "m-bptree.h" + +BPTREE_MULTI_DEF(tree, 4, int, DEFAULT_OPLIST) + #else # warning TEST variable is out of range. #endif