diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-03-10 21:12:43 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-03-10 21:12:43 +0100 |
commit | e9e2852ce1d7b3cdbbcc115d63f1d4d0ab25457f (patch) | |
tree | ff0d2625cb31699fa0e4fd28e6aacfe94ff63c8f /src/Globals.h | |
parent | Fixed assert (diff) | |
download | cuberite-e9e2852ce1d7b3cdbbcc115d63f1d4d0ab25457f.tar cuberite-e9e2852ce1d7b3cdbbcc115d63f1d4d0ab25457f.tar.gz cuberite-e9e2852ce1d7b3cdbbcc115d63f1d4d0ab25457f.tar.bz2 cuberite-e9e2852ce1d7b3cdbbcc115d63f1d4d0ab25457f.tar.lz cuberite-e9e2852ce1d7b3cdbbcc115d63f1d4d0ab25457f.tar.xz cuberite-e9e2852ce1d7b3cdbbcc115d63f1d4d0ab25457f.tar.zst cuberite-e9e2852ce1d7b3cdbbcc115d63f1d4d0ab25457f.zip |
Diffstat (limited to 'src/Globals.h')
-rw-r--r-- | src/Globals.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Globals.h b/src/Globals.h index b046e6db0..2cd160677 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -234,9 +234,10 @@ template class SizeChecker<UInt16, 2>; // Pretty much the same as ASSERT() but stays in Release builds #define VERIFY( x ) ( !!(x) || ( LOGERROR("Verification failed: %s, file %s, line %i", #x, __FILE__, __LINE__ ), exit(1), 0 ) ) - - - +// Same as assert but in all Self test builds +#ifdef SELF_TEST +#define assert_test(x) ( !!(x) || (assert(0), exit(1), 0)) +#endif /// A generic interface used mainly in ForEach() functions template <typename Type> class cItemCallback |