diff options
author | Emilia Kasper <emilia@openssl.org> | 2016-11-04 16:06:12 +0100 |
---|---|---|
committer | Emilia Kasper <emilia@openssl.org> | 2016-11-07 16:55:16 +0100 |
commit | d836d71b2da026b4ed9a2233657b2289ab8e4be0 (patch) | |
tree | c4c9b9e2112eaea750871d66914868ea8585a6da /test/ct_test.c | |
parent | 8e47ee18c8f7e59575effdd8dfcfbfff1a365ede (diff) |
Simplify tests part 2
1) Remove some unnecessary fixtures
2) Add EXECUTE_TEST_NO_TEARDOWN shorthand when a fixture exists but has
no teardown.
3) Fix return values in ct_test.c (introduced by an earlier refactoring,
oops)
Note that for parameterized tests, the index (test vector) usually holds all the
customization, and there should be no need for a separate test
fixture. The CTS test is an exception: it demonstrates how to combine
customization with parameterization.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'test/ct_test.c')
-rw-r--r-- | test/ct_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ct_test.c b/test/ct_test.c index db03f868ee..2553bc6922 100644 --- a/test/ct_test.c +++ b/test/ct_test.c @@ -507,20 +507,20 @@ static int test_encode_tls_sct() SCT *sct = SCT_new(); if (!SCT_set_version(sct, SCT_VERSION_V1)) { fprintf(stderr, "Failed to set SCT version\n"); - return 1; + return 0; } if (!SCT_set1_log_id(sct, log_id, 32)) { fprintf(stderr, "Failed to set SCT log ID\n"); - return 1; + return 0; } SCT_set_timestamp(sct, 1); if (!SCT_set_signature_nid(sct, NID_ecdsa_with_SHA256)) { fprintf(stderr, "Failed to set SCT signature NID\n"); - return 1; + return 0; } if (!SCT_set1_signature(sct, signature, 71)) { fprintf(stderr, "Failed to set SCT signature\n"); - return 1; + return 0; } sk_SCT_push(sct_list, sct); |