- int rint = -9999;
- test_parse_ok(xbt_str_parse_int, "Parse int", rint, "42", 42);
- test_parse_ok(xbt_str_parse_int, "Parse 0 as an int", rint, "0", 0);
- test_parse_ok(xbt_str_parse_int, "Parse -1 as an int", rint, "-1", -1);
-
- test_parse_error(xbt_str_parse_int, "Parse int + noise", rint, "342 cruft");
- test_parse_error(xbt_str_parse_int, "Parse nullptr as an int", rint, nullptr);
- test_parse_error(xbt_str_parse_int, "Parse '' as an int", rint, "");
- test_parse_error(xbt_str_parse_int, "Parse cruft as an int", rint, "cruft");
-
- double rdouble = -9999;
- test_parse_ok(xbt_str_parse_double, "Parse 42 as a double", rdouble, "42", 42);
- test_parse_ok(xbt_str_parse_double, "Parse 42.5 as a double", rdouble, "42.5", 42.5);
- test_parse_ok(xbt_str_parse_double, "Parse 0 as a double", rdouble, "0", 0);
- test_parse_ok(xbt_str_parse_double, "Parse -1 as a double", rdouble, "-1", -1);
-
- test_parse_error(xbt_str_parse_double, "Parse double + noise", rdouble, "342 cruft");
- test_parse_error(xbt_str_parse_double, "Parse nullptr as a double", rdouble, nullptr);
- test_parse_error(xbt_str_parse_double, "Parse '' as a double", rdouble, "");
- test_parse_error(xbt_str_parse_double, "Parse cruft as a double", rdouble, "cruft");
+ test_parse_ok(xbt_str_parse_int, "Parse int", "42", 42);
+ test_parse_ok(xbt_str_parse_int, "Parse 0 as an int", "0", 0);
+ test_parse_ok(xbt_str_parse_int, "Parse -1 as an int", "-1", -1);
+
+ test_parse_error(xbt_str_parse_int, "Parse int + noise", "342 cruft");
+ test_parse_error(xbt_str_parse_int, "Parse nullptr as an int", nullptr);
+ test_parse_error(xbt_str_parse_int, "Parse '' as an int", "");
+ test_parse_error(xbt_str_parse_int, "Parse cruft as an int", "cruft");
+
+ test_parse_ok(xbt_str_parse_double, "Parse 42 as a double", "42", 42);
+ test_parse_ok(xbt_str_parse_double, "Parse 42.5 as a double", "42.5", 42.5);
+ test_parse_ok(xbt_str_parse_double, "Parse 0 as a double", "0", 0);
+ test_parse_ok(xbt_str_parse_double, "Parse -1 as a double", "-1", -1);
+
+ test_parse_error(xbt_str_parse_double, "Parse double + noise", "342 cruft");
+ test_parse_error(xbt_str_parse_double, "Parse nullptr as a double", nullptr);
+ test_parse_error(xbt_str_parse_double, "Parse '' as a double", "");
+ test_parse_error(xbt_str_parse_double, "Parse cruft as a double", "cruft");