test check
parent
9669b96e47
commit
ec4a0e1b75
@ -0,0 +1,32 @@
|
||||
#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("Money");
|
||||
|
||||
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;
|
||||
}
|
Loading…
Reference in New Issue