2004-01-15 00:07:17 +00:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
#ifndef OMPI_SUPPORT_H
|
|
|
|
#define OMPI_SUPPORT_H
|
2004-01-15 00:07:17 +00:00
|
|
|
|
2004-06-15 22:41:41 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2004-01-15 00:07:17 +00:00
|
|
|
void test_init(char *a);
|
2004-01-15 00:33:59 +00:00
|
|
|
void test_success(void);
|
|
|
|
void test_failure(char *a);
|
2004-02-11 21:12:00 +00:00
|
|
|
int test_verify_str(const char *expected_result, const char *test_result);
|
2004-01-27 20:11:48 +00:00
|
|
|
int test_verify_int(int expected_result, int test_result);
|
2004-01-15 00:59:26 +00:00
|
|
|
int test_finalize(void);
|
2004-01-15 00:07:17 +00:00
|
|
|
|
2004-06-15 22:41:41 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* test_verify: Non-fatal assertion macro.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define test_verify(MESSAGE, EXPR) \
|
|
|
|
do { \
|
|
|
|
if (!(EXPR)) { \
|
|
|
|
char s[256]; \
|
|
|
|
sprintf(s, "%s:%d: %s: %s\n", \
|
|
|
|
__FILE__, __LINE__, MESSAGE, # EXPR); \
|
|
|
|
test_failure(s); \
|
|
|
|
} else { \
|
|
|
|
test_success(); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
#endif /* OMPI_SUPPORT_H */
|
2004-01-15 00:07:17 +00:00
|
|
|
|