{ "Simple Tests", -1, CK_FAILURE, "5 != 6" },
{ "Simple Tests", -1, CK_FAILURE, "7 == 7" },
{ "Simple Tests", -1, CK_FAILURE, "Failed" },
+ { "Simple Tests", 114, CK_FAILURE, "Failed" },
+ { "Simple Tests", 120, CK_FAILURE, "Failure expected" },
+ { "Simple Tests", 127, CK_FAILURE, "Failed" },
{ "Simple Tests", 139, CK_FAILURE, "Assertion 'x == y' failed" },
{ "Simple Tests", 145, CK_FAILURE, "Assertion '0' failed" },
{ "Simple Tests", 170, CK_FAILURE, "Assertion 'x==y' failed: x==3, y==4" },
}
END_TEST
+/* FIXME: all these line numbers are kind of hard to maintain */
+START_TEST(test_ck_abort)
+{
+ ck_abort(); /* line 114 */
+}
+END_TEST
+START_TEST(test_ck_abort_msg)
+{
+ ck_abort_msg("Failure expected"); /* line 120 */
+}
+END_TEST
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+/* FIXME: perhaps passing NULL to ck_abort_msg should be an error. */
+START_TEST(test_ck_abort_msg_null)
+{
+ ck_abort_msg(NULL); /* line 127 */
+}
+END_TEST
START_TEST(test_ck_assert)
{
-START_TEST(test_int_assert_eq)
+START_TEST(test_ck_assert_int_eq)
{
int x = 3;
int y = 3;
}
END_TEST
-START_TEST(test_int_assert_ne)
+START_TEST(test_ck_assert_int_ne)
{
int x = 3;
int y = 2;
}
END_TEST
-START_TEST(test_str_assert_eq)
+START_TEST(test_ck_assert_str_eq)
{
const char *s = "test2";
ck_assert_str_eq("test2", s);
}
END_TEST
-START_TEST(test_str_assert_ne)
+START_TEST(test_ck_assert_str_ne)
{
const char *s = "test2";
const char *t = "test1";
tcase_add_test (tc_simple, test_fail_vararg_msg_3);
tcase_add_test (tc_simple, test_fail_empty);
+ tcase_add_test (tc_simple, test_ck_abort);
+ tcase_add_test (tc_simple, test_ck_abort_msg);
+ tcase_add_test (tc_simple, test_ck_abort_msg_null);
tcase_add_test (tc_simple, test_ck_assert);
tcase_add_test (tc_simple, test_ck_assert_null);
- tcase_add_test (tc_simple, test_int_assert_eq);
- tcase_add_test (tc_simple, test_int_assert_ne);
- tcase_add_test (tc_simple, test_str_assert_eq);
- tcase_add_test (tc_simple, test_str_assert_ne);
+ tcase_add_test (tc_simple, test_ck_assert_int_eq);
+ tcase_add_test (tc_simple, test_ck_assert_int_ne);
+ tcase_add_test (tc_simple, test_ck_assert_str_eq);
+ tcase_add_test (tc_simple, test_ck_assert_str_ne);
tcase_add_test (tc_signal, test_segv);
tcase_add_test_raise_signal (tc_signal, test_segv, 11); /* pass */