summaryrefslogtreecommitdiff
path: root/test/assert/assert.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-01-29 02:31:32 +0000
committerMike Frysinger <vapier@gentoo.org>2007-01-29 02:31:32 +0000
commitddea243aab67af75ea04700edff5286a1e02eaf4 (patch)
tree77f796a4528e17257ea1a5f0f5df8fcde098ce95 /test/assert/assert.c
parent8c66250574a7ce7c0d8c38cc83437d814356d781 (diff)
fix test to work even if CPPFLAGS contains -DNDEBUG
Diffstat (limited to 'test/assert/assert.c')
-rw-r--r--test/assert/assert.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/assert/assert.c b/test/assert/assert.c
index b0f54c625..c7058ff59 100644
--- a/test/assert/assert.c
+++ b/test/assert/assert.c
@@ -6,6 +6,8 @@
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
+#undef NDEBUG
+
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
@@ -14,7 +16,7 @@
int got_abort;
-void aborthandler(int junk)
+static void aborthandler(int junk)
{
got_abort = 1;
}
@@ -29,9 +31,7 @@ int main(int argc, char *argv[])
assert(0 == 0);
TEST_NUMERIC(got_abort, 0);
-#ifndef NDEBUG
-# define NDEBUG
-#endif
+#define NDEBUG
got_abort = 0;
printf("Don't worry -- This next test is supposed to print an assert message:\n");
fprintf(stderr, "\t");