A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Ansi C declaration of the variables (at the beginning of the blocks)
[simgrid.git]
/
src
/
dict_unit.c
diff --git
a/src/dict_unit.c
b/src/dict_unit.c
index
8064938
..
23e1716
100644
(file)
--- a/
src/dict_unit.c
+++ b/
src/dict_unit.c
@@
-8,7
+8,7
@@
/* GENERATED FILE, DO NOT EDIT */
/*******************************/
/* GENERATED FILE, DO NOT EDIT */
/*******************************/
-#
472
"xbt/dict.c"
+#
603
"xbt/dict.c"
#include "xbt.h"
#include "xbt/ex.h"
#include "portable.h"
#include "xbt.h"
#include "xbt/ex.h"
#include "portable.h"
@@
-89,7
+89,7
@@
static void traverse(xbt_dict_t head) {
xbt_test_log2("Seen #%d: %s",++i,PRINTF_STR(key));
}
xbt_test_assert2(!data || !strcmp(key,data),
xbt_test_log2("Seen #%d: %s",++i,PRINTF_STR(key));
}
xbt_test_assert2(!data || !strcmp(key,data),
- "Key(%s) != value(%s). Abording
\n
",key,data);
+ "Key(%s) != value(%s). Abording",key,data);
}
}
}
}
@@
-312,7
+312,7
@@
static int countelems(xbt_dict_t head) {
}
return res;
}
}
return res;
}
-
+
XBT_TEST_UNIT("crash",test_dict_crash,"Crash test"){
xbt_dict_t head=NULL;
int i,j,k, nb;
XBT_TEST_UNIT("crash",test_dict_crash,"Crash test"){
xbt_dict_t head=NULL;
int i,j,k, nb;
@@
-363,7
+363,8
@@
XBT_TEST_UNIT("crash",test_dict_crash,"Crash test"){
sprintf(key,"%d",j);
xbt_dict_set(head,key,key,&free);
}
sprintf(key,"%d",j);
xbt_dict_set(head,key,key,&free);
}
-
+ /*xbt_dict_dump(head,(void (*)(void*))&printf);*/
+
xbt_test_add0("Count the elements (retrieving the key and data for each)");
i = countelems(head);
xbt_test_log1("There is %d elements",i);
xbt_test_add0("Count the elements (retrieving the key and data for each)");
i = countelems(head);
xbt_test_log1("There is %d elements",i);
@@
-377,7
+378,10
@@
XBT_TEST_UNIT("crash",test_dict_crash,"Crash test"){
sprintf(key,"%d",j);
data = xbt_dict_get(head,key);
xbt_test_assert2(!strcmp(key,(char*)data),
sprintf(key,"%d",j);
data = xbt_dict_get(head,key);
xbt_test_assert2(!strcmp(key,(char*)data),
- "key=%s != data=%s\n",key,(char*)data);
+ "with get, key=%s != data=%s",key,(char*)data);
+ data = xbt_dict_get_ext(head,key,strlen(key));
+ xbt_test_assert2(!strcmp(key,(char*)data),
+ "with get_ext, key=%s != data=%s",key,(char*)data);
}
}
free(key);
}
}
free(key);