Add skeleton of the API and data structures.
[apps/low-level-can-service.git] / tests / test_core.c
1 #include <check.h>
2 #include <stdint.h>
3 #include <stdio.h>
4 #include <stdbool.h>
5
6 void setup() {
7
8 }
9
10 START_TEST (test_fail)
11 {
12     fail_unless(false);
13 }
14 END_TEST
15
16 Suite* testSuite(void) {
17     Suite* s = suite_create("obd2");
18     TCase *tc_core = tcase_create("core");
19     tcase_add_checked_fixture(tc_core, setup, NULL);
20     tcase_add_test(tc_core, test_fail);
21     suite_add_tcase(s, tc_core);
22
23     return s;
24 }
25
26 int main(void) {
27     int numberFailed;
28     Suite* s = testSuite();
29     SRunner *sr = srunner_create(s);
30     // Don't fork so we can actually use gdb
31     srunner_set_fork_status(sr, CK_NOFORK);
32     srunner_run_all(sr, CK_NORMAL);
33     numberFailed = srunner_ntests_failed(sr);
34     srunner_free(sr);
35     return (numberFailed == 0) ? 0 : 1;
36 }