diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-12-16 19:08:54 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-12-16 19:08:54 +0000 |
commit | 9db10d18c0f4e25830f782acea9be6b971d48f3c (patch) | |
tree | cd207a1c7b436a033953f1a456f37fe0fb3d3397 /test/assert/assert.c | |
parent | 868274823302c293bdf3d31a3415f19d4030864e (diff) |
small cleanups
Diffstat (limited to 'test/assert/assert.c')
-rw-r--r-- | test/assert/assert.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/test/assert/assert.c b/test/assert/assert.c index 095609411..b0f54c625 100644 --- a/test/assert/assert.c +++ b/test/assert/assert.c @@ -16,29 +16,31 @@ int got_abort; void aborthandler(int junk) { - got_abort=1; + got_abort = 1; } -int main( int argc, char **argv) +int main(int argc, char *argv[]) { signal(SIGABRT, aborthandler); init_testsuite("Testing functions defined in assert.h:\n\t"); got_abort=0; - assert(0==0); + assert(0 == 0); TEST_NUMERIC(got_abort, 0); -#define NDEBUG - got_abort=0; +#ifndef NDEBUG +# define NDEBUG +#endif + got_abort = 0; printf("Don't worry -- This next test is supposed to print an assert message:\n"); fprintf(stderr, "\t"); - assert(0==1); + assert(0 == 1); TEST_NUMERIC(got_abort, 0); -#undef NDEBUG - got_abort=0; - assert(0==1); +#undef NDEBUG + got_abort = 0; + assert(0 == 1); TEST_NUMERIC(got_abort, 1); exit(0); |