diff options
author | Lorry <lorry@roadtrain.codethink.co.uk> | 2012-08-15 17:04:08 +0100 |
---|---|---|
committer | Lorry <lorry@roadtrain.codethink.co.uk> | 2012-08-15 17:04:08 +0100 |
commit | 35a870a7a23c7d6076c658c1ec2122b642f264ed (patch) | |
tree | b9ce5b562cf1a297844a7983c6b3fe33bb536d23 /tests/check_check_limit.c | |
download | check-35a870a7a23c7d6076c658c1ec2122b642f264ed.tar.gz |
Tarball conversion
Diffstat (limited to 'tests/check_check_limit.c')
-rw-r--r-- | tests/check_check_limit.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/check_check_limit.c b/tests/check_check_limit.c new file mode 100644 index 0000000..afd1c5d --- /dev/null +++ b/tests/check_check_limit.c @@ -0,0 +1,43 @@ +#include "../lib/libcompat.h" + +#include <stdlib.h> +#include <string.h> +#include <check.h> +#include "check_check.h" +#include "check_str.h" + + +static SRunner *sr; + +static void limit_setup (void) +{ + Suite *s = suite_create("Empty"); + sr = srunner_create(s); + srunner_run_all(sr, CK_VERBOSE); +} + +static void limit_teardown (void) +{ + srunner_free(sr); +} + +START_TEST(test_summary) +{ + fail_unless(strcmp(sr_stat_str(sr), + "100%: Checks: 0, Failures: 0, Errors: 0") == 0, + "Bad statistics string for empty suite"); +} +END_TEST + +Suite *make_limit_suite (void) +{ + Suite *s = suite_create("Limit"); + TCase *tc = tcase_create("Empty"); + + tcase_add_test(tc,test_summary); + tcase_add_unchecked_fixture(tc,limit_setup,limit_teardown); + + suite_add_tcase(s, tc); + + return s; +} |