From ddea243aab67af75ea04700edff5286a1e02eaf4 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 29 Jan 2007 02:31:32 +0000 Subject: fix test to work even if CPPFLAGS contains -DNDEBUG --- test/assert/assert.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/assert') 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 #include #include @@ -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"); -- cgit v1.2.3