X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/73d53de1c9a9a2b536522d0d2e04031276941caf..a7a5a24eadee8d76e5d9a5fd49a7c3df3a50df80:/testsuite/xbt/multidict_crash.c diff --git a/testsuite/xbt/multidict_crash.c b/testsuite/xbt/multidict_crash.c index c730666887..0663563aec 100644 --- a/testsuite/xbt/multidict_crash.c +++ b/testsuite/xbt/multidict_crash.c @@ -2,16 +2,14 @@ /* multidict_crash - A crash test for multi-level dictionnaries */ -/* Authors: Martin Quinson */ -/* Copyright (C) 2003 the OURAGAN project. */ +/* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it - under the terms of the license (GNU LGPL) which comes with this package. */ + * under the terms of the license (GNU LGPL) which comes with this package. */ #include -#include -#include +#include "gras.h" #define NB_ELM 10/*00*/ #define MULTICACHE_DEPTH 5 @@ -19,11 +17,11 @@ #define NB_TEST 20 int verbose=0; -static gras_error_t test1(); +static xbt_error_t test1(); -static gras_error_t test1() { - gras_error_t errcode; - gras_dict_t *head=NULL; +static xbt_error_t test1() { + xbt_error_t errcode; + xbt_dict_t *head=NULL; int i,j,k,l; char **key = NULL; char **val = NULL; @@ -51,13 +49,13 @@ static gras_error_t test1() { } val[l][k]='\0'; if (verbose) printf("%s ; ",val[l]); - key[l]=val[l];// NOWADAYS, no need to strdup the key. + key[l]=val[l];/* NOWADAYS, no need to strdup the key. */ } if (verbose) printf("in multitree %p.\n",head); - TRYFAIL(gras_multidict_set(&head,MULTICACHE_DEPTH,key, + TRYFAIL(xbt_multidict_set(&head,MULTICACHE_DEPTH,key, strdup(val[0]),&free)); - TRYFAIL(gras_multidict_get(head, + TRYFAIL(xbt_multidict_get(head, MULTICACHE_DEPTH,(const char **)val, &data)); if (!data || strcmp((char*)data,val[0])) { @@ -66,8 +64,8 @@ static gras_error_t test1() { abort(); } } - gras_dict_dump(head,&gras_dict_print); - gras_dict_free(&head); + xbt_dict_dump(head,&xbt_dict_print); + xbt_dict_free(&head); for (l=0 ; l