From c082f6b7a6f37b22617dc6a7aaad6effcd3757d3 Mon Sep 17 00:00:00 2001 From: tTh Date: Tue, 13 Nov 2018 14:51:31 +0100 Subject: [PATCH] il faut vraiment ameliorer le cadricel de test --- tbb.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tbb.c b/tbb.c index 1ed9251..9fee20c 100644 --- a/tbb.c +++ b/tbb.c @@ -1,4 +1,11 @@ +/* + * this is rudimentary test for the bubulles manages + * + * contact: on IRC freenode#tetalab + */ + #include +#include #include "bubulles.h" /* --------------------------------------------------------------------- */ @@ -19,6 +26,10 @@ BBList *bublist; int foo; bublist = alloc_bubulles("plop !", nbelm, 0); +if (NULL==bublist) { + fprintf(stderr, "err in %s, aborting...\n", __func__); + abort(); + } print_bublist_desc(bublist, 1); foo = free_bubulles(bublist, 0); @@ -39,7 +50,9 @@ for (idx=0; idx %d\n", foo); @@ -93,7 +106,7 @@ printf("peek 3 -> %7d\n", foo); foo = niceprint_bubulle(&bubulle, 0); printf("niceprint -> %7d\n", foo); -return -42; +return 0; } /* --------------------------------------------------------------------- */ @@ -101,7 +114,7 @@ int main(int argc, char *argv[]) { int foo; -printf("*** Bubulles Testing -- %s %s\n", __DATE__, __TIME__); +printf("*** Bubulles Testing -- %s %s\n\n", __DATE__, __TIME__); bubulles_version(0);