aboutsummaryrefslogtreecommitdiff
path: root/api_test/harness.h
blob: 5fdc7ae1a6f5b5e13a5a59d286a06c96676b04b0 (plain)
  1. #ifndef CMARK_API_TEST_HARNESS_H
  2. #define CMARK_API_TEST_HARNESS_H
  3. typedef struct {
  4. int test_num;
  5. int num_passed;
  6. int num_failed;
  7. int num_skipped;
  8. } test_batch_runner;
  9. test_batch_runner*
  10. test_batch_runner_new();
  11. void
  12. SKIP(test_batch_runner *runner, int num_tests);
  13. void
  14. OK(test_batch_runner *runner, int cond, const char *msg, ...);
  15. void
  16. INT_EQ(test_batch_runner *runner, int got, int expected, const char *msg, ...);
  17. void
  18. STR_EQ(test_batch_runner *runner, const char *got, const char *expected,
  19. const char *msg, ...);
  20. int
  21. test_ok(test_batch_runner *runner);
  22. void
  23. test_print_summary(test_batch_runner *runner);
  24. #endif