Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
change mismatch_error to not_found_error where appropriate
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 7 Aug 2005 14:11:09 +0000 (14:11 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sun, 7 Aug 2005 14:11:09 +0000 (14:11 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1602 48e7efb5-ca39-0410-a469-dd3cf9ba447f

testsuite/xbt/config_usage.c
testsuite/xbt/dict_crash.c
testsuite/xbt/dict_usage.c

index f4e1eae..47736a0 100644 (file)
@@ -99,9 +99,9 @@ int main(int argc, char **argv) {
   xbt_cfg_t myset=make_set();
   TRY {
     xbt_cfg_set_parse(myset,"color:blue");
   xbt_cfg_t myset=make_set();
   TRY {
     xbt_cfg_set_parse(myset,"color:blue");
-    THROW1(unknown_error,0,"Found an option which shouldn't be there (%s)","color:blue");
+    THROW1(mismatch_error,0,"Found an option which shouldn't be there (%s)","color:blue");
   } CATCH(e) {
   } CATCH(e) {
-    if (e.category != mismatch_error)
+    if (e.category != not_found_error)
       RETHROW;
     xbt_ex_free(e);
   }
       RETHROW;
     xbt_ex_free(e);
   }
index 5315b19..4753399 100644 (file)
@@ -140,7 +140,7 @@ int main(int argc,char **argv) {
     if (!(j%10000)) printf("."); fflush(stdout);
     
     sprintf(key,"%d",j);
     if (!(j%10000)) printf("."); fflush(stdout);
     
     sprintf(key,"%d",j);
-    TRYFAIL(xbt_dict_remove(head,key));
+    xbt_dict_remove(head,key);
   }
   printf("\n");
   free(key);
   }
   printf("\n");
   free(key);
index 04f4680..c71e524 100644 (file)
@@ -91,11 +91,9 @@ static void search_not_found(xbt_dict_t head, const char *data) {
     data = xbt_dict_get(head,"Can't be found");
     THROW1(unknown_error,0,"Found something which shouldn't be there (%s)",data);
   } CATCH(e) {
     data = xbt_dict_get(head,"Can't be found");
     THROW1(unknown_error,0,"Found something which shouldn't be there (%s)",data);
   } CATCH(e) {
-    if (e.category == mismatch_error) {
-      xbt_ex_free(e);
-    } else {
+    if (e.category != not_found_error) 
       RETHROW;
       RETHROW;
-    }
+    xbt_ex_free(e);
   }
 }
 
   }
 }
 
@@ -192,7 +190,7 @@ xbt_dict_dump(head,(void (*)(void*))&printf);
   TRY {
     debuged_remove(head,"Does not exist");
   } CATCH(e) {
   TRY {
     debuged_remove(head,"Does not exist");
   } CATCH(e) {
-    if (e.category != mismatch_error) 
+    if (e.category != not_found_error) 
       RETHROW;
     xbt_ex_free(e);
   }
       RETHROW;
     xbt_ex_free(e);
   }
@@ -218,7 +216,7 @@ xbt_dict_dump(head,(void (*)(void*))&printf);
   TRY {
     debuged_remove(head,"12346");
   } CATCH(e) {
   TRY {
     debuged_remove(head,"12346");
   } CATCH(e) {
-    if (e.category != mismatch_error) 
+    if (e.category != not_found_error) 
       RETHROW;
     xbt_ex_free(e);              traverse(head);
   } 
       RETHROW;
     xbt_ex_free(e);              traverse(head);
   } 
@@ -228,7 +226,7 @@ xbt_dict_dump(head,(void (*)(void*))&printf);
   TRY {
     debuged_remove(head,"12346");
   } CATCH(e) {
   TRY {
     debuged_remove(head,"12346");
   } CATCH(e) {
-    if (e.category != mismatch_error) 
+    if (e.category != not_found_error) 
       RETHROW;
     xbt_ex_free(e);              traverse(head);
   } 
       RETHROW;
     xbt_ex_free(e);              traverse(head);
   }