From: Sebastian Pipping Date: Wed, 12 Jul 2017 18:15:18 +0000 (+0200) Subject: runtests.c: Protect against -DNDEBUG (issue #76 related) X-Git-Tag: R_2_2_2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b5aaa782fab5e7476dc88206b7fdf76186030d7d;p=libexpat runtests.c: Protect against -DNDEBUG (issue #76 related) --- diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 5a4b49f7..5f5fde42 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -33,6 +33,18 @@ #define XML_FMT_INT_MOD "l" #endif + +#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;