diff options
author | 2015-03-20 22:50:32 +0100 | |
---|---|---|
committer | 2015-03-20 23:09:06 +0100 | |
commit | ec7e08d074dbeeabeab8800bab698c489ec33d75 (patch) | |
tree | e0d0154953bae9acb74fbed92a08ad3f0198b04b /src/emu | |
parent | d7d2628d60c700526b6bcf25b0034874391bdd55 (diff) |
Use the special asserts only for regression testing (nw)
Diffstat (limited to 'src/emu')
-rw-r--r-- | src/emu/emucore.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/emu/emucore.h b/src/emu/emucore.h index 899ee9fa670..d1eea01e08f 100644 --- a/src/emu/emucore.h +++ b/src/emu/emucore.h @@ -214,6 +214,11 @@ inline void operator--(_Type &value, int) { value = (_Type)((int)value - 1); } #define FUNC(x) &x, #x #define FUNC_NULL NULL, "(null)" +#ifndef REGRESSION_TESTING + +#define assert_always(x, msg) do { if (!(x)) { fprintf(stderr, "%s:%d: Assert failure: %s: %s\n", __FILE__, __LINE__, msg, #x); abort(); }} while (0) + +#else // standard assertion macros #undef assert @@ -230,6 +235,8 @@ inline void operator--(_Type &value, int) { value = (_Type)((int)value - 1); } #define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("Fatal error: %s (%s:%d)", msg, __FILE__, __LINE__); } while (0) #endif +#endif + // macros to convert radians to degrees and degrees to radians #define RADIAN_TO_DEGREE(x) ((180.0 / M_PI) * (x)) |