diff options
author | Emilia Kasper <emilia@openssl.org> | 2016-11-03 17:15:41 +0100 |
---|---|---|
committer | Emilia Kasper <emilia@openssl.org> | 2016-11-04 15:05:37 +0100 |
commit | 308b876da9eff2f6455a32751b7ffeeaf6ee3fb8 (patch) | |
tree | ce1de47cc15626719be85670aefea5434a46e605 /test/d2i_test.c | |
parent | testutil: always print errors on failure (diff) | |
download | openssl-308b876da9eff2f6455a32751b7ffeeaf6ee3fb8.tar.xz openssl-308b876da9eff2f6455a32751b7ffeeaf6ee3fb8.zip |
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>
Diffstat (limited to 'test/d2i_test.c')
-rw-r--r-- | test/d2i_test.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/test/d2i_test.c b/test/d2i_test.c index c536764bae..e12f249242 100644 --- a/test/d2i_test.c +++ b/test/d2i_test.c @@ -41,18 +41,7 @@ typedef struct { static expected_error_t expected_error = ASN1_UNKNOWN; -typedef struct d2i_test_fixture { - const char *test_case_name; -} D2I_TEST_FIXTURE; - -static D2I_TEST_FIXTURE set_up(const char *const test_case_name) -{ - D2I_TEST_FIXTURE fixture; - fixture.test_case_name = test_case_name; - return fixture; -} - -static int execute_test(D2I_TEST_FIXTURE fixture) +static int test_bad_asn1() { BIO *bio = NULL; ASN1_VALUE *value = NULL; @@ -116,22 +105,6 @@ static int execute_test(D2I_TEST_FIXTURE fixture) return ret; } -static void tear_down(D2I_TEST_FIXTURE fixture) -{ -} - -#define SETUP_D2I_TEST_FIXTURE() \ - SETUP_TEST_FIXTURE(D2I_TEST_FIXTURE, set_up) - -#define EXECUTE_D2I_TEST() \ - EXECUTE_TEST(execute_test, tear_down) - -static int test_bad_asn1() -{ - SETUP_D2I_TEST_FIXTURE(); - EXECUTE_D2I_TEST(); -} - /* * Usage: d2i_test <type> <file>, e.g. * d2i_test generalname bad_generalname.der |