diff --git a/test/test_dstr.c b/test/test_dstr.c index 6168e98..f8f2fce 100644 --- a/test/test_dstr.c +++ b/test/test_dstr.c @@ -31,7 +31,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); @@ -129,11 +129,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); diff --git a/test/test_runner.c b/test/test_runner.c index 5c09bb3..92c0eb0 100644 --- a/test/test_runner.c +++ b/test/test_runner.c @@ -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);