diff options
author | Mike Bland <mbland@acm.org> | 2014-06-19 12:27:54 -0400 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2014-07-19 19:24:35 +0100 |
commit | 5e3de8e609d1cb16696ac2896984ac4d1969ae26 (patch) | |
tree | 3fcde505ab421dd78dcc7cf73e36c1435686e268 /test/testutil.h | |
parent | d31fed73e25391cd71a0de488d88724db78f6f8a (diff) |
test/testutil.c test registry functions.
These help standardize the structure of main() and result reporting.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'test/testutil.h')
-rw-r--r-- | test/testutil.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/testutil.h b/test/testutil.h index 3e9cb84015..adb092a2f1 100644 --- a/test/testutil.h +++ b/test/testutil.h @@ -113,4 +113,12 @@ #define TEST_CASE_NAME __func__ #endif /* __STDC_VERSION__ */ +/* In main(), call ADD_TEST to register each test case function, then call + * run_tests() to execute all tests and report the results. The result + * returned from run_tests() should be used as the return value for main(). + */ +#define ADD_TEST(test_function) add_test(#test_function, test_function) +void add_test(const char* test_case_name, int (*test_fn)()); +int run_tests(const char* test_prog_name); + #endif /* HEADER_TESTUTIL_H */ |