run.c 540 B

12345678910111213141516171819202122
  1. #include "check_type/check_type.h"
  2. #include "tap/tap.h"
  3. int main(int argc, char *argv[])
  4. {
  5. int x = 0, y = 0;
  6. plan_tests(9);
  7. ok1(check_type(argc, int) == 0);
  8. ok1(check_type(&argc, int *) == 0);
  9. ok1(check_types_match(argc, argc) == 0);
  10. ok1(check_types_match(argc, x) == 0);
  11. ok1(check_types_match(&argc, &x) == 0);
  12. ok1(check_type(x++, int) == 0);
  13. ok(x == 0, "check_type does not evaluate expression");
  14. ok1(check_types_match(x++, y++) == 0);
  15. ok(x == 0 && y == 0, "check_types_match does not evaluate expressions");
  16. return 0;
  17. }