You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
599 B
C

#include <check.h>
#include <stdbool.h>
#include <stdlib.h>
START_TEST(test_check) {
ck_assert(true);
ck_assert(false == true);
}
END_TEST
Suite *test_suite(void) {
Suite *s = suite_create("Test");
TCase *tc_core = tcase_create("Core");
tcase_add_test(tc_core, test_check);
suite_add_tcase(s, tc_core);
return s;
}
int main(void) {
int number_failed;
Suite *s = test_suite();
SRunner *sr = srunner_create(s);
srunner_run_all(sr, CK_NORMAL);
number_failed = srunner_ntests_failed(sr);
srunner_free(sr);
return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}