Commit 0c5035be by Alexis Hetu Committed by Alexis Hétu

Enable more checks on Chromium trybots

In order to catch errors faster, this change enables asserts on Chromium trybots. Change-Id: Ifdc4c9e0ec7d54aa7f6f333d992054c4e0062efe Reviewed-on: https://swiftshader-review.googlesource.com/12328Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent bba05f37
...@@ -27,19 +27,19 @@ ...@@ -27,19 +27,19 @@
void trace(const char *format, ...); void trace(const char *format, ...);
#ifndef NDEBUG #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
#define TRACE(format, ...) trace("[0x%0.8X]%s(" format ")\n", this, __FUNCTION__, ##__VA_ARGS__) #define TRACE(format, ...) trace("[0x%0.8X]%s(" format ")\n", this, __FUNCTION__, ##__VA_ARGS__)
#else #else
#define TRACE(...) ((void)0) #define TRACE(...) ((void)0)
#endif #endif
#ifndef NDEBUG #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
#define UNIMPLEMENTED() {trace("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__); ASSERT(false);} #define UNIMPLEMENTED() {trace("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__); ASSERT(false);}
#else #else
#define UNIMPLEMENTED() ((void)0) #define UNIMPLEMENTED() ((void)0)
#endif #endif
#ifndef NDEBUG #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
#define ASSERT(expression) {if(!(expression)) trace("\t! Assert failed in %s(%d): " #expression "\n", __FUNCTION__, __LINE__); assert(expression);} #define ASSERT(expression) {if(!(expression)) trace("\t! Assert failed in %s(%d): " #expression "\n", __FUNCTION__, __LINE__); assert(expression);}
#else #else
#define ASSERT assert #define ASSERT assert
......
...@@ -56,7 +56,7 @@ namespace es ...@@ -56,7 +56,7 @@ namespace es
// A macro asserting a condition and outputting failures to the debug log // A macro asserting a condition and outputting failures to the debug log
#undef ASSERT #undef ASSERT
#if !defined(NDEBUG) #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
#define ASSERT(expression) do { \ #define ASSERT(expression) do { \
if(!(expression)) \ if(!(expression)) \
ERR("\t! Assert failed in %s(%d): "#expression"\n", __FUNCTION__, __LINE__); \ ERR("\t! Assert failed in %s(%d): "#expression"\n", __FUNCTION__, __LINE__); \
...@@ -68,7 +68,7 @@ namespace es ...@@ -68,7 +68,7 @@ namespace es
// A macro to indicate unimplemented functionality // A macro to indicate unimplemented functionality
#undef UNIMPLEMENTED #undef UNIMPLEMENTED
#if !defined(NDEBUG) #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
#define UNIMPLEMENTED() do { \ #define UNIMPLEMENTED() do { \
FIXME("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__); \ FIXME("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__); \
assert(false); \ assert(false); \
...@@ -79,7 +79,7 @@ namespace es ...@@ -79,7 +79,7 @@ namespace es
// A macro for code which is not expected to be reached under valid assumptions // A macro for code which is not expected to be reached under valid assumptions
#undef UNREACHABLE #undef UNREACHABLE
#if !defined(NDEBUG) #if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
#define UNREACHABLE(value) do { \ #define UNREACHABLE(value) do { \
ERR("\t! Unreachable case reached: %s(%d). %s: %d\n", __FUNCTION__, __LINE__, #value, value); \ ERR("\t! Unreachable case reached: %s(%d). %s: %d\n", __FUNCTION__, __LINE__, #value, value); \
assert(false); \ assert(false); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment