X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b1acf7fe2f1886e9adcb4313f53548c9995a906c..32f13ca1c7961662a097b1b906f589a851bb3611:/testsuite/xbt/dict_crash.c diff --git a/testsuite/xbt/dict_crash.c b/testsuite/xbt/dict_crash.c index 82ddc2e411..8c4b79b99b 100644 --- a/testsuite/xbt/dict_crash.c +++ b/testsuite/xbt/dict_crash.c @@ -11,6 +11,7 @@ #include #include #include +#include #define NB_ELM 200000 #define SIZEOFKEY 1024 @@ -20,6 +21,7 @@ static void print_str(void *str) { printf("%s",(char*)str); } +GRAS_LOG_NEW_DEFAULT_CATEGORY(test,"Logging specific to this test"); static gras_error_t traverse(gras_dict_t *head) { gras_dict_cursor_t *cursor=NULL; @@ -27,11 +29,9 @@ static gras_error_t traverse(gras_dict_t *head) { char *data; gras_dict_foreach(head,cursor,key,data) { - // printf(" Seen: %s=%s\n",key,data); - if (strcmp(key,data)) { - printf("Key(%s) != value(%s). Abording\n",key,data); - abort(); - } + /* printf(" Seen: %s=%s\n",key,data); */ + gras_assert2 (!strcmp(key,data), + "Key(%s) != value(%s). Abording\n",key,data); } return no_error; } @@ -64,7 +64,7 @@ int main(int argc,char **argv) { printf(" (a point is a test)\n"); for (i=0;i<20;i++) { - TRYFAIL(gras_dict_new(&head)); + head=gras_dict_new(); if (i%10) printf("."); else printf("%d",i/10); fflush(stdout); nb=0; for (j=0;j<1000;j++) { @@ -76,11 +76,11 @@ int main(int argc,char **argv) { for (k=0;k