From a378d97dc9d9eadaef00a9f01816948db5f3a796 Mon Sep 17 00:00:00 2001 From: rpj Date: Tue, 4 Jan 2000 10:19:28 +0000 Subject: 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 --- tests/test.h | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'tests/test.h') 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 +#include "pthread.h" +#include "sched.h" +#include "semaphore.h" #include 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 */ -- cgit v1.2.3