Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use variadic variants of xbt_test_{add,fail,assert,log}.
[simgrid.git] / src / xbt / config.c
index 8ecc594..47d9cd2 100644 (file)
@@ -1368,7 +1368,7 @@ static xbt_cfg_t make_set()
 XBT_TEST_UNIT("memuse", test_config_memuse, "Alloc and free a config set")
 {
   xbt_cfg_t set = make_set();
-  xbt_test_add0("Alloc and free a config set");
+  xbt_test_add("Alloc and free a config set");
   xbt_cfg_set_parse(set,
                     "peername:veloce user:mquinson\nuser:oaumage\tuser:alegrand");
   xbt_cfg_free(&set);
@@ -1380,7 +1380,7 @@ XBT_TEST_UNIT("validation", test_config_validation, "Validation tests")
   xbt_cfg_t set = set = make_set();
   xbt_ex_t e;
 
-  xbt_test_add0("Having too few elements for speed");
+  xbt_test_add("Having too few elements for speed");
   xbt_cfg_set_parse(set,
                     "peername:veloce user:mquinson\nuser:oaumage\tuser:alegrand");
   TRY {
@@ -1390,7 +1390,7 @@ XBT_TEST_UNIT("validation", test_config_validation, "Validation tests")
     if (e.category != mismatch_error ||
         strncmp(e.msg, "Config elem speed needs",
                 strlen("Config elem speed needs")))
-      xbt_test_fail1("Got an exception. msg=%s", e.msg);
+      xbt_test_fail("Got an exception. msg=%s", e.msg);
     xbt_ex_free(e);
   }
   xbt_cfg_free(&set);
@@ -1398,7 +1398,7 @@ XBT_TEST_UNIT("validation", test_config_validation, "Validation tests")
 
 
 
-  xbt_test_add0("Having too much values of 'speed'");
+  xbt_test_add("Having too much values of 'speed'");
   set = make_set();
   xbt_cfg_set_parse(set, "peername:toto:42 user:alegrand");
   TRY {
@@ -1408,7 +1408,7 @@ XBT_TEST_UNIT("validation", test_config_validation, "Validation tests")
     if (e.category != mismatch_error ||
         strncmp(e.msg, "Cannot add value 34 to the config elem speed",
                 strlen("Config elem speed needs")))
-      xbt_test_fail1("Got an exception. msg=%s", e.msg);
+      xbt_test_fail("Got an exception. msg=%s", e.msg);
     xbt_ex_free(e);
   }
   xbt_cfg_check(set);
@@ -1420,7 +1420,7 @@ XBT_TEST_UNIT("validation", test_config_validation, "Validation tests")
 XBT_TEST_UNIT("use", test_config_use, "Data retrieving tests")
 {
 
-  xbt_test_add0("Get a single value");
+  xbt_test_add("Get a single value");
   {
     /* get_single_value */
     int ival;
@@ -1429,11 +1429,11 @@ XBT_TEST_UNIT("use", test_config_use, "Data retrieving tests")
     xbt_cfg_set_parse(myset, "peername:toto:42 speed:42");
     ival = xbt_cfg_get_int(myset, "speed");
     if (ival != 42)
-      xbt_test_fail1("Speed value = %d, I expected 42", ival);
+      xbt_test_fail("Speed value = %d, I expected 42", ival);
     xbt_cfg_free(&myset);
   }
 
-  xbt_test_add0("Get multiple values");
+  xbt_test_add("Get multiple values");
   {
     /* get_multiple_value */
     xbt_dynar_t dyn;
@@ -1446,24 +1446,24 @@ XBT_TEST_UNIT("use", test_config_use, "Data retrieving tests")
     dyn = xbt_cfg_get_dynar(myset, "user");
 
     if (xbt_dynar_length(dyn) != 3)
-      xbt_test_fail1("Dynar length = %lu, I expected 3",
+      xbt_test_fail("Dynar length = %lu, I expected 3",
                      xbt_dynar_length(dyn));
 
     if (strcmp(xbt_dynar_get_as(dyn, 0, char *), "foo"))
-       xbt_test_fail1("Dynar[0] = %s, I expected foo",
+       xbt_test_fail("Dynar[0] = %s, I expected foo",
                       xbt_dynar_get_as(dyn, 0, char *));
 
     if (strcmp(xbt_dynar_get_as(dyn, 1, char *), "bar"))
-       xbt_test_fail1("Dynar[1] = %s, I expected bar",
+       xbt_test_fail("Dynar[1] = %s, I expected bar",
                       xbt_dynar_get_as(dyn, 1, char *));
 
     if (strcmp(xbt_dynar_get_as(dyn, 2, char *), "toto"))
-       xbt_test_fail1("Dynar[2] = %s, I expected toto",
+       xbt_test_fail("Dynar[2] = %s, I expected toto",
                       xbt_dynar_get_as(dyn, 2, char *));
     xbt_cfg_free(&myset);
   }
 
-  xbt_test_add0("Access to a non-existant entry");
+  xbt_test_add("Access to a non-existant entry");
   {
     /* non-existant_entry */
     xbt_cfg_t myset = make_set();