You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

checker.h 1.2 kB

12345678910111213141516171819
  1. #ifndef __EXERCISE_H__
  2. #define __EXERCISE_H__
  3. #include <iostream>
  4. #define ASSERT(COND, MSG) \
  5. if (!(COND)) { \
  6. std::cerr << "\x1b[31mAssertion failed at line #" << __LINE__ << ": \x1b[0m" << std::endl \
  7. << std::endl \
  8. << #COND << std::endl \
  9. << std::endl \
  10. << "\x1b[34mMessage:\x1b[0m" << std::endl \
  11. << std::endl \
  12. << MSG << std::endl \
  13. << std::endl; \
  14. exit(1); \
  15. }
  16. #endif// __EXERCISE_H__