Don't create fixtures for simple tests
The test fixtures are (meant to be) useful for sharing common
setup. Don't bother when we don't have any setup/teardown.
This only addresses simple tests. Parameterized tests (ADD_ALL_TESTS)
will be made more user-friendly in a follow-up.
Reviewed-by: Rich Salz <rsalz@openssl.org>
diff --git a/test/testutil.h b/test/testutil.h
index 68d202a..af7c48c 100644
--- a/test/testutil.h
+++ b/test/testutil.h
@@ -12,7 +12,15 @@
#include <openssl/err.h>
+/*
+ * 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)
+
/*-
+ * Test cases that share common setup should use the helper
* 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
@@ -69,13 +77,6 @@
# 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)
-
-/*
* Simple parameterized tests. Adds a test_function(idx) test for each
* 0 <= idx < num.
*/