From d836d71b2da026b4ed9a2233657b2289ab8e4be0 Mon Sep 17 00:00:00 2001 From: Emilia Kasper Date: Fri, 4 Nov 2016 16:06:12 +0100 Subject: 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 --- test/ct_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/ct_test.c') 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); -- cgit v1.2.3