check_parser.c 603 B

12345678910111213141516171819202122232425262728293031323334
  1. #include <stdlib.h>
  2. #include <check.h>
  3. START_TEST (parser_check)
  4. {
  5. fail_if (1 > 2);
  6. }
  7. END_TEST
  8. Suite *
  9. parser_suite (void)
  10. {
  11. Suite *s = suite_create ("Parsing");
  12. /* Core test case */
  13. TCase *tc_core = tcase_create ("Core");
  14. tcase_add_test (tc_core, parser_check);
  15. suite_add_tcase (s, tc_core);
  16. return s;
  17. }
  18. int
  19. main (void)
  20. {
  21. int number_failed;
  22. Suite *s = parser_suite ();
  23. SRunner *sr = srunner_create (s);
  24. srunner_run_all (sr, CK_NORMAL);
  25. number_failed = srunner_ntests_failed (sr);
  26. srunner_free (sr);
  27. return (number_failed == 0)
  28. ? EXIT_SUCCESS
  29. : EXIT_FAILURE;
  30. }