mirror of
https://github.com/holub/mame
synced 2025-07-04 01:18:59 +03:00
Use the special asserts only for regression testing (nw)
This commit is contained in:
parent
d7d2628d60
commit
ec7e08d074
@ -214,6 +214,11 @@ inline void operator--(_Type &value, int) { value = (_Type)((int)value - 1); }
|
|||||||
#define FUNC(x) &x, #x
|
#define FUNC(x) &x, #x
|
||||||
#define FUNC_NULL NULL, "(null)"
|
#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
|
// standard assertion macros
|
||||||
#undef assert
|
#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)
|
#define assert_always(x, msg) do { if (!(x)) throw emu_fatalerror("Fatal error: %s (%s:%d)", msg, __FILE__, __LINE__); } while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// macros to convert radians to degrees and degrees to radians
|
// macros to convert radians to degrees and degrees to radians
|
||||||
#define RADIAN_TO_DEGREE(x) ((180.0 / M_PI) * (x))
|
#define RADIAN_TO_DEGREE(x) ((180.0 / M_PI) * (x))
|
||||||
|
Loading…
Reference in New Issue
Block a user