]> granicus.if.org Git - libexpat/commitdiff
runtests.c: Protect against -DNDEBUG (issue #76 related)
authorSebastian Pipping <sebastian@pipping.org>
Wed, 12 Jul 2017 18:15:18 +0000 (20:15 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Wed, 12 Jul 2017 18:16:37 +0000 (20:16 +0200)
expat/tests/runtests.c

index 5a4b49f7fc2ed7ceec35e7165c9ff09fdcb621d0..5f5fde429fe7897989e855cc1d83309e7c9d4f7e 100644 (file)
 #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;