diff options
author | rpj <rpj> | 2000-01-04 10:19:28 +0000 |
---|---|---|
committer | rpj <rpj> | 2000-01-04 10:19:28 +0000 |
commit | a378d97dc9d9eadaef00a9f01816948db5f3a796 (patch) | |
tree | 654435cc0a85156c2a9b4793ab7d8e0da8424e32 /tests/test.h | |
parent | 27d833666dfd72cc6e74c3900d3e8e66321bea3a (diff) |
Main changes (see ChangeLog diff for details and attributions):-
- asynchronous cancellation added
- attempt to hide internal exceptions from applications
- kernel32 load/free problem fixed
- new tests
- changes only to comments in some tests
Diffstat (limited to 'tests/test.h')
-rw-r--r-- | tests/test.h | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/tests/test.h b/tests/test.h index 36dc397..ffb8180 100644 --- a/tests/test.h +++ b/tests/test.h @@ -7,7 +7,9 @@ #ifndef _PTHREAD_TEST_H_ #define _PTHREAD_TEST_H_ -#include <pthread.h> +#include "pthread.h" +#include "sched.h" +#include "semaphore.h" #include <stdio.h> char * error_string[] = { @@ -61,28 +63,31 @@ char * error_string[] = { * which pops up a dialog. We want to run in batch mode so * we define our own assert macro. */ +#ifdef assert +# undef assert +#endif + #ifdef NDEBUG -#define assert(e) ((void)0) +# define assert(e) ((void)0) #else /* NDEBUG */ -#ifdef assert -# undef assert -#endif - #ifndef ASSERT_TRACE -#define ASSERT_TRACE 0 +# define ASSERT_TRACE 0 +#else +# undef ASSERT_TRACE +# define ASSERT_TRACE 1 #endif -#define assert(e) \ - ((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))) +# define assert(e) \ + ((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 */ |