fix compilation error
[openssl.git] / test / testutil.h
index 3e9cb8401562057d2899b5f7762efca9071fffc5..502be2e6377e0ea060736f95c9f0444a21094b72 100644 (file)
@@ -1,5 +1,5 @@
 /* test/testutil.h */
-/*
+/*-
  * Utilities for writing OpenSSL unit tests.
  *
  * More information:
@@ -59,7 +59,8 @@
 #ifndef HEADER_TESTUTIL_H
 #define HEADER_TESTUTIL_H
 
-/* SETUP_TEST_FIXTURE and EXECUTE_TEST macros for test case functions.
+/*-
+ * SETUP_TEST_FIXTURE and EXECUTE_TEST macros for test case functions.
  *
  * SETUP_TEST_FIXTURE will call set_up() to create a new TEST_FIXTURE_TYPE
  * object called "fixture". It will also allocate the "result" variable used
 #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 */