summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristopher Peplin <chris.peplin@rhubarbtech.com>2013-12-27 11:22:56 -0500
committerChristopher Peplin <chris.peplin@rhubarbtech.com>2013-12-27 11:22:56 -0500
commit9dafed6b7fe2fe45f44aa8c614d51388f84bb696 (patch)
tree5696061f4887685a27f46d1f505f98cff9f1f926 /tests
Initial commit with blank structure.
Diffstat (limited to 'tests')
-rw-r--r--tests/tests.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/tests.c b/tests/tests.c
new file mode 100644
index 00000000..62b3df8d
--- /dev/null
+++ b/tests/tests.c
@@ -0,0 +1,30 @@
+#include <check.h>
+#include <stdint.h>
+#include <bitfield/bitfield.h>
+
+START_TEST (test_fail)
+{
+ fail_if(true);
+}
+END_TEST
+
+Suite* bitfieldSuite(void) {
+ Suite* s = suite_create("iso15765");
+ TCase *tc_core = tcase_create("core");
+ tcase_add_test(tc_core, test_fail);
+ suite_add_tcase(s, tc_core);
+
+ return s;
+}
+
+int main(void) {
+ int numberFailed;
+ Suite* s = bitfieldSuite();
+ SRunner *sr = srunner_create(s);
+ // Don't fork so we can actually use gdb
+ srunner_set_fork_status(sr, CK_NOFORK);
+ srunner_run_all(sr, CK_NORMAL);
+ numberFailed = srunner_ntests_failed(sr);
+ srunner_free(sr);
+ return (numberFailed == 0) ? 0 : 1;
+}