Merge branch 'master' into dev
This commit is contained in:
+3
-3
@@ -32,7 +32,7 @@ START_TEST (test_dstr_basics)
|
||||
ck_assert_str_eq(uc_dstr_str(&str), "");
|
||||
|
||||
uc_dstr_reset(&str);
|
||||
ck_assert_int_gt(uc_dstr_available(&str), 0);
|
||||
fail_if(uc_dstr_available(&str) <= 0);
|
||||
|
||||
s = uc_dstr_put(&str, 2);
|
||||
fail_if(s == NULL);
|
||||
@@ -130,11 +130,11 @@ START_TEST (test_dstr_sprintf)
|
||||
|
||||
uc_dstr_init(&str);
|
||||
rc = uc_dstr_sprintf(&str, "%d-%d-%d", 1, 2, 3);
|
||||
ck_assert_int_gt(rc, 0);
|
||||
fail_if(rc <= 0);
|
||||
ck_assert_str_eq(uc_dstr_str(&str), "1-2-3");
|
||||
|
||||
rc = uc_dstr_sprintf(&str, " Another, bigger %s.", "string");
|
||||
ck_assert_int_gt(rc, 0);
|
||||
fail_if(rc <= 0);
|
||||
ck_assert_str_eq(uc_dstr_str(&str), "1-2-3 Another, bigger string.");
|
||||
|
||||
uc_dstr_destroy(&str);
|
||||
|
||||
@@ -94,8 +94,13 @@ main (int argc, char *argv[])
|
||||
if (test_case == NULL) {
|
||||
srunner_run_all (sr, CK_VERBOSE);
|
||||
} else {
|
||||
#if CHECK_MAJOR_VERSION == 0 && CHECK_MINOR_VERSION == 9 && CHECK_MICRO_VERSION <= 8
|
||||
printf("Sorry, this libcheck version does not support running individual test cases");
|
||||
return 3;
|
||||
#else
|
||||
printf("Running %s only\n", test_case);
|
||||
srunner_run(sr, NULL, test_case, CK_VERBOSE);
|
||||
#endif
|
||||
}
|
||||
number_failed = srunner_ntests_failed (sr);
|
||||
srunner_free (sr);
|
||||
|
||||
Reference in New Issue
Block a user