diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2022-05-10 21:12:33 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2022-05-10 21:12:33 +0300 |
commit | 16538abf8d1231279133508ba15376145b818518 (patch) | |
tree | e19079645f87163f674faa333044330c37374ea9 /tests/foodtest.in | |
parent | e739c5dccc0faf13cbddacd1950e203305aa4bab (diff) | |
download | foodtools-16538abf8d1231279133508ba15376145b818518.tar.gz foodtools-16538abf8d1231279133508ba15376145b818518.tar.bz2 foodtools-16538abf8d1231279133508ba15376145b818518.zip |
autotools and check testign suite
Diffstat (limited to 'tests/foodtest.in')
-rw-r--r-- | tests/foodtest.in | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/foodtest.in b/tests/foodtest.in new file mode 100644 index 0000000..484cfeb --- /dev/null +++ b/tests/foodtest.in @@ -0,0 +1,50 @@ +/* -*- mode: c -*- */ +#include <check.h> + +/* + * Source files check by this suite: + */ +#include "../src/types.c" +#include "../src/util.c" +/* + * Test suite based on check + * + * To add a new case simply create the <case>.c file + * in the tests/ directory and include it below + * Also add the new file to the EXTRA_DIST files in + * tests/Makefile.am + * + * To add a new test go to the appropriate case file + * and add it there + */ +#include "types.c" +#include "util.c" + +Suite * foodtest_suite(void) +{ + Suite *s; + + s = suite_create("foodtools tests"); + + /*** maketests.sh begin ***/ + /* everything in here will be replaced upon building */ + /* DO NOT delete the begin/end lines */ + /*** maketests.sh end ***/ + + return s; +} + +int main(void) +{ + int number_failed; + Suite *s; + SRunner *sr; + + s = foodtest_suite(); + sr = srunner_create(s); + srunner_set_tap(sr, "-"); + srunner_run_all(sr, CK_NORMAL); + number_failed = srunner_ntests_failed(sr); + srunner_free(sr); + return (number_failed == 0) ? 0 : CK_FAILURE; +} |