8159365: assert is not defined for unit tests
Reviewed-by: jwilhelm, coleenp
This commit is contained in:
parent
3be991b9fb
commit
d39f9a9b55
@ -27,8 +27,17 @@
|
||||
|
||||
#define GTEST_DONT_DEFINE_TEST 1
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
// gtest/gtest.h includes assert.h which will define the assert macro, but hotspot has its
|
||||
// own standards incompatible assert macro that takes two parameters.
|
||||
// The workaround is to undef assert and then re-define it. The re-definition
|
||||
// must unfortunately be copied since debug.hpp might already have been
|
||||
// included and a second include wouldn't work due to the header guards in debug.hpp.
|
||||
#ifdef assert
|
||||
#undef assert
|
||||
#ifdef vmassert
|
||||
#define assert(p, ...) vmassert(p, __VA_ARGS__)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define CONCAT(a, b) a ## b
|
||||
|
Loading…
Reference in New Issue
Block a user