testing.h 665 B

1234567891011121314151617
  1. #ifndef NETSNMP_LIBRARY_TESTING_H
  2. #define NETSNMP_LIBRARY_TESTING_H
  3. /* These are macros used for the net-snmp testing infrastructure; see
  4. the "testing" subdirectory of the source code for details. */
  5. static int __test_counter = 0;
  6. static int __did_plan = 0;
  7. #define OK(isok, description) do { printf("%s %d - %s\n", ((isok) ? "ok" : "not ok"), ++__test_counter, description); } while (0)
  8. #define OKF(isok, description) do { printf("%s %d - ", ((isok) ? "ok" : "not ok"), ++__test_counter); printf description; printf("\n"); } while (0)
  9. #define PLAN(number) do { printf("1..%d\n", number); __did_plan = 1; } while (0)
  10. #endif /* NETSNMP_LIBRARY_TESTING_H */