From: Sebastian Pipping Date: Tue, 24 Oct 2017 19:41:18 +0000 (+0200) Subject: Tests: Fix CPPFLAGS=-DNDEBUG ourselves (#160) X-Git-Tag: R_2_2_5~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=535047b10c74981caaa8bffc1c59e19c42e668c6;p=libexpat Tests: Fix CPPFLAGS=-DNDEBUG ourselves (#160) --- 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;