diff options
author | rpj <rpj> | 1999-03-14 05:29:18 +0000 |
---|---|---|
committer | rpj <rpj> | 1999-03-14 05:29:18 +0000 |
commit | f8af93c39f8deebc46aee1b25be9d5c40035d0d8 (patch) | |
tree | 6874f918fe82259682384ccfd2539cf62e6cd217 /tests/test.h | |
parent | c181e5bb2ccf9d351553eaadf66578df441024a6 (diff) |
Mon Mar 15 00:20:13 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au>snap-1999-03-15
* condvar.c (pthread_cond_init): fix possible uninitialised use
of cv.
Sun Mar 14 21:01:59 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* condvar.c (pthread_cond_destroy): don't do full cleanup if
static initialised cv has never been used.
(cond_timedwait): check result of auto-initialisation.
tests/ChangeLog
Mon Mar 15 00:17:55 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* mutex1.c: only test mutex init and destroy; add assertions.
* count1.c: raise number of spawned threads to 60 (appears to
be the limit under Win98).
Sun Mar 14 21:31:02 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* test.h (assert): add assertion trace option.
Use:
"#define ASSERT_TRACE 1" to turn it on,
"#define ASSERT_TRACE 0" to turn it off (default).
* condvar3.c (main): add more assertions.
* condvar4.c (main): add more assertions.
* condvar1.c (main): add more assertions.
Diffstat (limited to 'tests/test.h')
-rw-r--r-- | tests/test.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/test.h b/tests/test.h index 23bcd48..36dc397 100644 --- a/tests/test.h +++ b/tests/test.h @@ -71,10 +71,18 @@ char * error_string[] = { # undef assert #endif +#ifndef ASSERT_TRACE +#define ASSERT_TRACE 0 +#endif + #define assert(e) \ - ((e) ? (void) 0 : \ - (fprintf(stderr, "Assertion failed: (%s), file %s, line %d\n", \ - #e, __FILE__, (int) __LINE__), exit(1))) + ((e) ? ((ASSERT_TRACE) ? fprintf(stderr, \ + "Assertion succeeded: (%s), file %s, line %d\n", \ + #e, __FILE__, (int) __LINE__), \ + fflush(stderr) : \ + (void) 0) : \ + (fprintf(stderr, "Assertion failed: (%s), file %s, line %d\n", \ + #e, __FILE__, (int) __LINE__), exit(1))) #endif /* NDEBUG */ |