From 535047b10c74981caaa8bffc1c59e19c42e668c6 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 24 Oct 2017 21:41:18 +0200 Subject: [PATCH] Tests: Fix CPPFLAGS=-DNDEBUG ourselves (#160) --- expat/Changes | 1 + expat/tests/runtests.c | 14 ++++---------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/expat/Changes b/expat/Changes index 72976053..132f0744 100644 --- a/expat/Changes +++ b/expat/Changes @@ -29,6 +29,7 @@ Release 2.2.5 ??????????????????? and dereferencing that pointer #6 Resolve superfluous internal malloc/realloc switch #153 #155 Improve docbook2x-man detection + #160 Undefine NDEBUG in the test suite (rather than rejecting it) Special thanks to: Benbuck Nason diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 8e26a785..5d729eab 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -30,6 +30,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#if defined(NDEBUG) +# undef NDEBUG /* because test suite relies on assert(...) at the moment */ +#endif + #ifdef HAVE_EXPAT_CONFIG_H # include #endif @@ -92,16 +96,6 @@ # endif /* XML_UNICODE */ #endif /* XML_UNICODE_WCHAR_T */ -#if defined(NDEBUG) -# error \ - The test suite relies on assert(...) at the moment. \ - You have NDEBUG defined which removes that code so that failures in the \ - test suite can go unnoticed. \ - \ - While we rely on assert(...), compiling the test suite with NDEBUG \ - defined is not supported. -#endif - static XML_Parser parser = NULL; -- 2.40.0