Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Test the usage of empty dictionaries
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 20 Sep 2006 14:03:23 +0000 (14:03 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 20 Sep 2006 14:03:23 +0000 (14:03 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2789 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/xbt/dict.c

index 6c13d1c..227347b 100644 (file)
@@ -571,9 +571,21 @@ char *data;
 
 
 XBT_TEST_UNIT("basic",test_dict_basic,"Basic usage: change, retrieve, traverse"){
 
 
 XBT_TEST_UNIT("basic",test_dict_basic,"Basic usage: change, retrieve, traverse"){
-  xbt_test_add0("Traversal the empty dictionnary");
+  xbt_test_add0("Traversal the null dictionnary");
   traverse(head);
 
   traverse(head);
 
+  xbt_test_add0("Traversal and search the empty dictionnary");
+  head = xbt_dict_new();
+  traverse(head);
+  TRY {
+    debuged_remove(head,"12346");
+  } CATCH(e) {
+    if (e.category != not_found_error) 
+      xbt_test_exception(e);
+    xbt_ex_free(e);
+  }
+  xbt_dict_free(&head);
+
   xbt_test_add0("Traverse the full dictionnary");
   fill(&head);
   count(head, 7);
   xbt_test_add0("Traverse the full dictionnary");
   fill(&head);
   count(head, 7);