diff --git a/system/include/platform.h b/system/include/platform.h index b703e13ba10..fc1c1aa1b73 100644 --- a/system/include/platform.h +++ b/system/include/platform.h @@ -18,8 +18,6 @@ #ifndef _PLATFORM_H_ #define _PLATFORM_H_ -#define _TESTING // this should remain set for the near future - // **** Architecture detection **** // Ref: http://sourceforge.net/p/predef/wiki/Architectures/ // Following GNU, ARMCC, ICC and MSVS macros only diff --git a/system/jlib/jiface.hpp b/system/jlib/jiface.hpp index ca502ab010d..500ff9b63c4 100644 --- a/system/jlib/jiface.hpp +++ b/system/jlib/jiface.hpp @@ -33,13 +33,9 @@ __declspec(noreturn) void jlib_decl raiseAssertCore(const char *assertion, const #undef assert #undef assertex -#if defined(_DEBUG)||defined(_TESTING) - #define assertex(p) (likely(p) ? ((void) 0) : (( (void) raiseAssertException(#p, __FILE__, __LINE__)))) - #define verifyex(p) (likely(p) ? ((void) 0) : (( (void) raiseAssertException(#p, __FILE__, __LINE__)))) -#else - #define assertex(p) - #define verifyex(p) ((void) (p)) -#endif +// NB: assertex should be a NOP in release really, but changing now may have undesirable side-effects +#define assertex(p) (likely(p) ? ((void) 0) : (( (void) raiseAssertException(#p, __FILE__, __LINE__)))) +#define verifyex(p) (likely(p) ? ((void) 0) : (( (void) raiseAssertException(#p, __FILE__, __LINE__)))) #ifdef _DEBUG #define dbgassertex(x) assertex(x) //Use for asserts that are highly unlikely to occur, and would likely to be reproduced in debug mode. diff --git a/system/jlib/jsocket.cpp b/system/jlib/jsocket.cpp index 2788268b8ed..8d113a0db84 100644 --- a/system/jlib/jsocket.cpp +++ b/system/jlib/jsocket.cpp @@ -130,9 +130,8 @@ //#define EPOLLTRACE #endif -#ifdef _TESTING +// comment out this definition to suppress all low-level jsocket error logging #define _TRACE -#endif #ifdef _TRACE #define LOGERR(err,ref,info) LogErr(err,ref,info,__LINE__,NULL) diff --git a/thorlcr/graph/thgraphslave.hpp b/thorlcr/graph/thgraphslave.hpp index 5476e5f999a..542c73116ce 100644 --- a/thorlcr/graph/thgraphslave.hpp +++ b/thorlcr/graph/thgraphslave.hpp @@ -85,7 +85,6 @@ class CEdgeProgress inline void dataLinkIncrement() { dataLinkIncrement(1); } inline void dataLinkIncrement(rowcount_t v) { -#ifdef _TESTING assertex(hasStarted()); #ifdef OUTPUT_RECORDSIZE if (count==THORDATALINK_STARTED) @@ -93,7 +92,6 @@ class CEdgeProgress size32_t rsz = parent.queryRowMetaData(this)->getMinRecordSize(); parent.ActPrintLog("Record size %s= %d", parent.queryRowMetaData(this)->isVariableSize()?"(min) ":"",rsz); } -#endif #endif icount += v; count += v; diff --git a/thorlcr/msort/tsorta.cpp b/thorlcr/msort/tsorta.cpp index 573db3d0e8e..6bf83cc6241 100644 --- a/thorlcr/msort/tsorta.cpp +++ b/thorlcr/msort/tsorta.cpp @@ -341,6 +341,7 @@ void CThorKeyArray::createSortedPartition(unsigned pn) keys.swap(newrows); } +#define VALIDATE_KEY_BOUNDARIES int CThorKeyArray::binchopPartition(const void * row,bool lt) { int n = (int)ordinality(); @@ -349,7 +350,7 @@ int CThorKeyArray::binchopPartition(const void * row,bool lt) int a = 0; int b = n; int cmp = 0; -#ifdef _TESTING +#ifdef VALIDATE_KEY_BOUNDARIES try { #endif while (a0)&&(keyCompare(m-1,m)==0)) m--; -#ifdef _TESTING +#ifdef VALIDATE_KEY_BOUNDARIES if (m>0) assertex(keyRowCompare((unsigned)m-1,row)<0); #endif @@ -382,7 +383,7 @@ try { a = m+1; } } -#ifdef _TESTING +#ifdef VALIDATE_KEY_BOUNDARIES if (lt) { if (a