diff options
author | rpj <rpj> | 2004-11-03 01:08:41 +0000 |
---|---|---|
committer | rpj <rpj> | 2004-11-03 01:08:41 +0000 |
commit | ec8290acdaea21b16d98f1ef5d4ae8a28ab2109a (patch) | |
tree | 0bd3750ec1cc12594b6cfe69473e393da6ec101b /tests/test.h | |
parent | cccaf0c2c82e78a72d69a4a50c872f308bed2f65 (diff) |
Mutex, semaphore, thread ID, test suite changes - see ChangeLogs
Diffstat (limited to 'tests/test.h')
-rw-r--r-- | tests/test.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test.h b/tests/test.h index 072b797..b337674 100644 --- a/tests/test.h +++ b/tests/test.h @@ -45,6 +45,8 @@ #include <windows.h> #include <stdio.h> +#define PTW32_THREAD_NULL_ID {NULL,0} + char * error_string[] = { "ZERO_or_EOK", "EPERM", @@ -122,6 +124,16 @@ char * error_string[] = { (fprintf(stderr, "Assertion failed: (%s), file %s, line %d\n", \ #e, __FILE__, (int) __LINE__), exit(1), 0)) +int assertE; +# define assert_e(e, o, r) \ + (((assertE = e) o (r)) ? ((ASSERT_TRACE) ? fprintf(stderr, \ + "Assertion succeeded: (%s), file %s, line %d\n", \ + #e, __FILE__, (int) __LINE__), \ + fflush(stderr) : \ + 0) : \ + (fprintf(stderr, "Assertion failed: (%s %s %s), file %s, line %d, error %s\n", \ + #e,#o,#r, __FILE__, (int) __LINE__, error_string[assertE]), exit(1), 0)) + #endif /* NDEBUG */ |