old-sample/legacy-checkmate/lib/checkAssert.h
raw| 1 | /* checkAssert.h |
| 2 | */ |
| 3 | #ifndef _CHECKASSERT_H |
| 4 | #define _CHECKASSERT_H |
| 5 | #include <cassert> |
| 6 | |
| 7 | namespace osl |
| 8 | { |
| 9 | namespace checkmate |
| 10 | { |
| 11 | void checkAbort(const char *func, const char *file, int line, |
| 12 | const char *exp); |
| 13 | } // namespace checkmate |
| 14 | } // namespace osl |
| 15 | |
| 16 | #define check_assert(x) assert((x) || (checkAbort(__func__, __FILE__, __LINE__, #x),0)) |
| 17 | |
| 18 | #endif /* _CHECKASSERT_H */ |
| 19 | // ;;; Local Variables: |
| 20 | // ;;; mode:c++ |
| 21 | // ;;; c-basic-offset:2 |
| 22 | // ;;; End: |