Home | History | Annotate | Download | only in test

Lines Matching refs:fixture

26     CMP_ASN_TEST_FIXTURE *fixture;
28 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))))
30 fixture->test_case_name = test_case_name;
31 return fixture;
34 static void tear_down(CMP_ASN_TEST_FIXTURE *fixture)
36 ASN1_OCTET_STRING_free(fixture->src_string);
37 if (fixture->tgt_string != fixture->src_string)
38 ASN1_OCTET_STRING_free(fixture->tgt_string);
40 OPENSSL_free(fixture);
43 static int execute_cmp_asn1_get_int_test(CMP_ASN_TEST_FIXTURE *fixture)
74 fixture->expected = 1;
80 fixture)
82 if (!TEST_int_eq(fixture->expected,
83 ossl_cmp_asn1_octet_string_set1(&fixture->tgt_string,
84 fixture->src_string)))
86 if (fixture->expected != 0)
87 return TEST_int_eq(0, ASN1_OCTET_STRING_cmp(fixture->tgt_string, fixture->src_string));
94 fixture->expected = 1;
95 if (!TEST_ptr(fixture->tgt_string = ASN1_OCTET_STRING_new())
96 || !TEST_ptr(fixture->src_string = ASN1_OCTET_STRING_new())
97 || !TEST_true(ASN1_OCTET_STRING_set(fixture->src_string, rand_data,
99 tear_down(fixture);
100 fixture = NULL;
109 fixture->expected = 1;
110 if (!TEST_ptr(fixture->src_string = ASN1_OCTET_STRING_new())
111 || !(fixture->tgt_string = fixture->src_string)
112 || !TEST_true(ASN1_OCTET_STRING_set(fixture->src_string, rand_data,
114 tear_down(fixture);
115 fixture = NULL;