Lines Matching refs:fixture

26     CMP_ASN_TEST_FIXTURE *fixture;  in set_up()  local
28 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
30 fixture->test_case_name = test_case_name; in set_up()
31 return fixture; in set_up()
34 static void tear_down(CMP_ASN_TEST_FIXTURE *fixture) in tear_down() argument
36 ASN1_OCTET_STRING_free(fixture->src_string); in tear_down()
37 if (fixture->tgt_string != fixture->src_string) in tear_down()
38 ASN1_OCTET_STRING_free(fixture->tgt_string); in tear_down()
40 OPENSSL_free(fixture); in tear_down()
43 static int execute_cmp_asn1_get_int_test(CMP_ASN_TEST_FIXTURE *fixture) in execute_cmp_asn1_get_int_test() argument
74 fixture->expected = 1; in test_cmp_asn1_get_int()
80 fixture) in execute_CMP_ASN1_OCTET_STRING_set1_test() argument
82 if (!TEST_int_eq(fixture->expected, in execute_CMP_ASN1_OCTET_STRING_set1_test()
83 ossl_cmp_asn1_octet_string_set1(&fixture->tgt_string, in execute_CMP_ASN1_OCTET_STRING_set1_test()
84 fixture->src_string))) in execute_CMP_ASN1_OCTET_STRING_set1_test()
86 if (fixture->expected != 0) in execute_CMP_ASN1_OCTET_STRING_set1_test()
87 return TEST_int_eq(0, ASN1_OCTET_STRING_cmp(fixture->tgt_string, in execute_CMP_ASN1_OCTET_STRING_set1_test()
88 fixture->src_string)); in execute_CMP_ASN1_OCTET_STRING_set1_test()
95 fixture->expected = 1; in test_ASN1_OCTET_STRING_set()
96 if (!TEST_ptr(fixture->tgt_string = ASN1_OCTET_STRING_new()) in test_ASN1_OCTET_STRING_set()
97 || !TEST_ptr(fixture->src_string = ASN1_OCTET_STRING_new()) in test_ASN1_OCTET_STRING_set()
98 || !TEST_true(ASN1_OCTET_STRING_set(fixture->src_string, rand_data, in test_ASN1_OCTET_STRING_set()
100 tear_down(fixture); in test_ASN1_OCTET_STRING_set()
101 fixture = NULL; in test_ASN1_OCTET_STRING_set()
110 fixture->expected = 1; in test_ASN1_OCTET_STRING_set_tgt_is_src()
111 if (!TEST_ptr(fixture->src_string = ASN1_OCTET_STRING_new()) in test_ASN1_OCTET_STRING_set_tgt_is_src()
112 || !(fixture->tgt_string = fixture->src_string) in test_ASN1_OCTET_STRING_set_tgt_is_src()
113 || !TEST_true(ASN1_OCTET_STRING_set(fixture->src_string, rand_data, in test_ASN1_OCTET_STRING_set_tgt_is_src()
115 tear_down(fixture); in test_ASN1_OCTET_STRING_set_tgt_is_src()
116 fixture = NULL; in test_ASN1_OCTET_STRING_set_tgt_is_src()