Latest update.

This commit is contained in:
2020-01-17 19:45:12 +09:00
parent 016df9f433
commit 0f7abb4eb6
1100 changed files with 47785 additions and 16292 deletions
+7 -16
View File
@@ -24,21 +24,10 @@ typedef struct test_fixture {
static CMP_ASN_TEST_FIXTURE *set_up(const char *const test_case_name)
{
CMP_ASN_TEST_FIXTURE *fixture;
int setup_ok = 0;
/* Allocate memory owned by the fixture, exit on error */
if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))))
goto err;
return NULL;
fixture->test_case_name = test_case_name;
setup_ok = 1;
err:
if (!setup_ok) {
#ifndef OPENSSL_NO_STDIO
ERR_print_errors_fp(stderr);
#endif
exit(EXIT_FAILURE);
}
return fixture;
}
@@ -51,8 +40,7 @@ static void tear_down(CMP_ASN_TEST_FIXTURE *fixture)
OPENSSL_free(fixture);
}
static int execute_cmp_asn1_get_int_test(CMP_ASN_TEST_FIXTURE *
fixture)
static int execute_cmp_asn1_get_int_test(CMP_ASN_TEST_FIXTURE *fixture)
{
ASN1_INTEGER *asn1integer = ASN1_INTEGER_new();
ASN1_INTEGER_set(asn1integer, 77);
@@ -121,12 +109,15 @@ void cleanup_tests(void)
int setup_tests(void)
{
RAND_bytes(rand_data, OSSL_CMP_TRANSACTIONID_LENGTH);
/* ASN.1 related tests */
ADD_TEST(test_cmp_asn1_get_int);
ADD_TEST(test_ASN1_OCTET_STRING_set);
ADD_TEST(test_ASN1_OCTET_STRING_set_tgt_is_src);
/* TODO make sure that total number of tests (here currently 24) is shown,
also for other cmp_*text.c. Currently the test drivers always show 1. */
/*
* TODO make sure that total number of tests (here currently 24) is shown,
* also for other cmp_*text.c. Currently the test drivers always show 1.
*/
return 1;
}