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