Home
last modified time | relevance | path

Searched full:fixture (Results 1 – 25 of 76) sorted by relevance

1234

/freebsd/crypto/openssl/test/
H A Dcmp_protect_test.c38 static void tear_down(CMP_PROTECT_TEST_FIXTURE *fixture) in tear_down() argument
40 if (fixture != NULL) { in tear_down()
41 OSSL_CMP_CTX_free(fixture->cmp_ctx); in tear_down()
42 OSSL_CMP_MSG_free(fixture->msg); in tear_down()
43 OSSL_CMP_PKISI_free(fixture->si); in tear_down()
45 OPENSSL_free(fixture->mem); in tear_down()
46 sk_X509_free(fixture->certs); in tear_down()
47 sk_X509_free(fixture->chain); in tear_down()
49 OPENSSL_free(fixture); in tear_down()
55 CMP_PROTECT_TEST_FIXTURE *fixture; in set_up() local
[all …]
H A Dcmp_msg_test.c38 static void tear_down(CMP_MSG_TEST_FIXTURE *fixture) in tear_down() argument
40 OSSL_CMP_CTX_free(fixture->cmp_ctx); in tear_down()
41 OSSL_CMP_MSG_free(fixture->msg); in tear_down()
42 OSSL_CMP_PKISI_free(fixture->si); in tear_down()
43 OPENSSL_free(fixture); in tear_down()
50 CMP_MSG_TEST_FIXTURE *fixture; in set_up() local
52 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
54 fixture->test_case_name = test_case_name; in set_up()
56 if (!TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new(libctx, NULL)) in set_up()
57 || !TEST_true(SET_OPT_UNPROTECTED_SEND(fixture->cmp_ctx, 1)) in set_up()
[all …]
H A Dcmp_vfy_test.c43 static void tear_down(CMP_VFY_TEST_FIXTURE *fixture) in tear_down() argument
45 OSSL_CMP_MSG_free(fixture->msg); in tear_down()
46 OSSL_CMP_CTX_free(fixture->cmp_ctx); in tear_down()
47 OPENSSL_free(fixture); in tear_down()
55 CMP_VFY_TEST_FIXTURE *fixture; in set_up() local
57 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
61 fixture->test_case_name = test_case_name; in set_up()
63 || !TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new(libctx, NULL)) in set_up()
64 || !OSSL_CMP_CTX_set0_trustedStore(fixture->cmp_ctx, ts) in set_up()
65 || !OSSL_CMP_CTX_set_log_cb(fixture->cmp_ctx, print_to_bio_out)) { in set_up()
[all …]
H A Dcmp_hdr_test.c24 static void tear_down(CMP_HDR_TEST_FIXTURE *fixture) in tear_down() argument
26 OSSL_CMP_PKIHEADER_free(fixture->hdr); in tear_down()
27 OSSL_CMP_CTX_free(fixture->cmp_ctx); in tear_down()
28 OPENSSL_free(fixture); in tear_down()
33 CMP_HDR_TEST_FIXTURE *fixture; in set_up() local
35 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
37 fixture->test_case_name = test_case_name; in set_up()
38 if (!TEST_ptr(fixture->cmp_ctx = OSSL_CMP_CTX_new(NULL, NULL))) in set_up()
40 if (!TEST_ptr(fixture in set_up()
49 execute_HDR_set_get_pvno_test(CMP_HDR_TEST_FIXTURE * fixture) execute_HDR_set_get_pvno_test() argument
72 execute_HDR_get0_senderNonce_test(CMP_HDR_TEST_FIXTURE * fixture) execute_HDR_get0_senderNonce_test() argument
103 execute_HDR_set1_sender_test(CMP_HDR_TEST_FIXTURE * fixture) execute_HDR_set1_sender_test() argument
132 execute_HDR_set1_recipient_test(CMP_HDR_TEST_FIXTURE * fixture) execute_HDR_set1_recipient_test() argument
162 execute_HDR_update_messageTime_test(CMP_HDR_TEST_FIXTURE * fixture) execute_HDR_update_messageTime_test() argument
200 execute_HDR_set1_senderKID_test(CMP_HDR_TEST_FIXTURE * fixture) execute_HDR_set1_senderKID_test() argument
230 execute_HDR_push0_freeText_test(CMP_HDR_TEST_FIXTURE * fixture) execute_HDR_push0_freeText_test() argument
261 execute_HDR_push1_freeText_test(CMP_HDR_TEST_FIXTURE * fixture) execute_HDR_push1_freeText_test() argument
295 execute_HDR_generalInfo_push0_item_test(CMP_HDR_TEST_FIXTURE * fixture) execute_HDR_generalInfo_push0_item_test() argument
322 execute_HDR_generalInfo_push1_items_test(CMP_HDR_TEST_FIXTURE * fixture) execute_HDR_generalInfo_push1_items_test() argument
382 execute_HDR_set_and_check_implicitConfirm_test(CMP_HDR_TEST_FIXTURE * fixture) execute_HDR_set_and_check_implicitConfirm_test() argument
397 execute_HDR_init_test(CMP_HDR_TEST_FIXTURE * fixture) execute_HDR_init_test() argument
[all...]
H A Dcmp_client_test.c48 static void tear_down(CMP_SES_TEST_FIXTURE *fixture) in tear_down() argument
50 OSSL_CMP_CTX_free(fixture->cmp_ctx); in tear_down()
51 ossl_cmp_mock_srv_free(fixture->srv_ctx); in tear_down()
52 sk_X509_free(fixture->caPubs); in tear_down()
53 OPENSSL_free(fixture); in tear_down()
58 CMP_SES_TEST_FIXTURE *fixture; in set_up() local
62 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
64 fixture->test_case_name = test_case_name; in set_up()
65 if (!TEST_ptr(fixture->srv_ctx = ossl_cmp_mock_srv_new(libctx, NULL)) in set_up()
66 || !OSSL_CMP_SRV_CTX_set_accept_unprotected(fixture->srv_ctx, 1) in set_up()
[all …]
H A Dct_test.c62 CT_TEST_FIXTURE *fixture = NULL; in set_up() local
64 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
66 fixture->test_case_name = test_case_name; in set_up()
67 fixture->epoch_time_in_ms = 1580335307000ULL; /* Wed 29 Jan 2020 10:01:47 PM UTC */ in set_up()
68 if (!TEST_ptr(fixture->ctlog_store = CTLOG_STORE_new()) in set_up()
70 CTLOG_STORE_load_default_file(fixture->ctlog_store), 1)) in set_up()
72 return fixture; in set_up()
75 if (fixture != NULL) in set_up()
76 CTLOG_STORE_free(fixture in set_up()
82 tear_down(CT_TEST_FIXTURE * fixture) tear_down() argument
183 assert_validity(CT_TEST_FIXTURE * fixture,STACK_OF (SCT)* scts,CT_POLICY_EVAL_CTX * policy_ctx) assert_validity() argument
224 execute_cert_test(CT_TEST_FIXTURE * fixture) execute_cert_test() argument
[all...]
H A Dcmp_asn_test.c26 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
[all …]
H A Dssl_test_ctx_test.c112 SSL_TEST_CTX_TEST_FIXTURE *fixture; in set_up() local
114 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
116 fixture->test_case_name = test_case_name; in set_up()
117 if (!TEST_ptr(fixture->expected_ctx = SSL_TEST_CTX_new(NULL))) { in set_up()
118 OPENSSL_free(fixture); in set_up()
121 return fixture; in set_up()
124 static int execute_test(SSL_TEST_CTX_TEST_FIXTURE *fixture) in execute_test() argument
129 if (!TEST_ptr(ctx = SSL_TEST_CTX_create(conf, fixture->test_section, in execute_test()
130 fixture->expected_ctx->libctx)) in execute_test()
131 || !testctx_eq(ctx, fixture->expected_ctx)) in execute_test()
[all …]
H A Dcmp_status_test.c24 CMP_STATUS_TEST_FIXTURE *fixture; in set_up() local
26 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
28 fixture->test_case_name = test_case_name; in set_up()
29 return fixture; in set_up()
32 static void tear_down(CMP_STATUS_TEST_FIXTURE *fixture) in tear_down() argument
34 OPENSSL_free(fixture); in tear_down()
41 static int execute_PKISI_test(CMP_STATUS_TEST_FIXTURE *fixture) in execute_PKISI_test() argument
48 if (!TEST_ptr(si = OSSL_CMP_STATUSINFO_new(fixture->pkistatus, in execute_PKISI_test()
49 fixture->pkifailure, in execute_PKISI_test()
50 fixture->text))) in execute_PKISI_test()
[all …]
H A Dcipherlist_test.c31 static void tear_down(CIPHERLIST_TEST_FIXTURE *fixture) in tear_down() argument
33 if (fixture != NULL) { in tear_down()
34 SSL_CTX_free(fixture->server); in tear_down()
35 SSL_CTX_free(fixture->client); in tear_down()
36 fixture->server = fixture->client = NULL; in tear_down()
37 OPENSSL_free(fixture); in tear_down()
43 CIPHERLIST_TEST_FIXTURE *fixture; in set_up() local
45 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
47 fixture->test_case_name = test_case_name; in set_up()
48 if (!TEST_ptr(fixture->server = SSL_CTX_new(TLS_server_method())) in set_up()
[all …]
H A Dkeymgmt_internal_test.c35 } FIXTURE; typedef
40 static void tear_down(FIXTURE *fixture) in tear_down() argument
42 if (fixture != NULL) { in tear_down()
43 OSSL_PROVIDER_unload(fixture->prov1); in tear_down()
44 OSSL_PROVIDER_unload(fixture->prov2); in tear_down()
45 OSSL_LIB_CTX_free(fixture->ctx1); in tear_down()
46 OSSL_LIB_CTX_free(fixture->ctx2); in tear_down()
47 OPENSSL_free(fixture); in tear_down()
51 static FIXTURE *set_u
53 FIXTURE *fixture; set_up() local
142 test_pass_rsa(FIXTURE * fixture) test_pass_rsa() argument
[all...]
H A Dcmp_server_test.c25 static void tear_down(CMP_SRV_TEST_FIXTURE *fixture) in tear_down() argument
27 OSSL_CMP_SRV_CTX_free(fixture->srv_ctx); in tear_down()
28 OPENSSL_free(fixture); in tear_down()
33 CMP_SRV_TEST_FIXTURE *fixture; in set_up() local
35 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
37 fixture->test_case_name = test_case_name; in set_up()
38 if (!TEST_ptr(fixture->srv_ctx = OSSL_CMP_SRV_CTX_new(libctx, NULL))) in set_up()
40 return fixture; in set_up()
43 tear_down(fixture); in set_up()
62 static int execute_test_handle_request(CMP_SRV_TEST_FIXTURE *fixture) in execute_test_handle_request() argument
[all …]
H A Dcmp_ctx_test.c26 static void tear_down(OSSL_CMP_CTX_TEST_FIXTURE *fixture) in tear_down() argument
28 if (fixture != NULL) in tear_down()
29 OSSL_CMP_CTX_free(fixture->ctx); in tear_down()
30 OPENSSL_free(fixture); in tear_down()
35 OSSL_CMP_CTX_TEST_FIXTURE *fixture; in set_up() local
37 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up()
39 if (!TEST_ptr(fixture->ctx = OSSL_CMP_CTX_new(NULL, NULL))) { in set_up()
40 tear_down(fixture); in set_up()
43 fixture->test_case_name = test_case_name; in set_up()
44 return fixture; in set_up()
[all …]
/freebsd/contrib/googletest/googletest/samples/
H A Dsample5_unittest.cc30 // This sample teaches how to reuse a test fixture in multiple test
33 // When you define a test fixture, you specify the name of the test
34 // case that will use this fixture. Therefore, a test fixture can
42 // test fixture, and then have each test case use a fixture derived
43 // from this super fixture.
56 // We put the code for timing a test in a test fixture called
57 // "QuickTest". QuickTest is intended to be the super fixture that
84 // We derive a fixture named IntegerFunctionTest from the QuickTest
85 // fixture. All tests using this fixture will be automatically
88 // We don't need any more logic than already in the QuickTest fixture.
[all …]
H A Dsample3_unittest.cc33 // test fixture.
35 // A test fixture is a place to hold objects and functions shared by
36 // all tests in a test case. Using a test fixture avoids duplicating
43 // The tests share the test fixture in the sense of code sharing, not
45 // fixture. You cannot expect the data modified by one test to be
59 // in a test fixture.
66 // To use a test fixture, derive a class from testing::Test.
113 // When you have a test fixture, you define a test using TEST_F
118 // You can access data in the test fixture here. in TEST_F()
H A Dsample6_unittest.cc54 // Then we define a test fixture class template.
86 // TestCaseName must match the test fixture name.
97 // TypeParam, and refer to the fixture class by TestFixture. We in TYPED_TEST()
101 // writing 'this->' when referring to members of the fixture class. in TYPED_TEST()
148 // First, define a test fixture class template. Here we just reuse
149 // the PrimeTableTest fixture defined earlier:
155 // fixture, and also the name of the test case (as usual). The _P
/freebsd/contrib/googletest/docs/
H A Dprimer.md92 *test fixture* class.
208 can use a *test fixture*. This allows you to reuse the same configuration of
211 To create a fixture:
214 we'll want to access fixture members from sub-classes.
226 When using a fixture, use `TEST_F()` instead of `TEST()` as it allows you to
227 access objects and subroutines in the test fixture:
236 fixture class. (`_F` stands for "Fixture"). No test suite name is specified for
243 Also, you must first define a test fixture class before using it in a
248 fixture at runtime, immediately initialize it via `SetUp()`, run the test, clean
249 up by calling `TearDown()`, and then delete the test fixture. Note that
[all …]
H A Dfaq.md197 ## Can I derive a test fixture from another?
201 Each test fixture has a corresponding and same named test suite. This means only
202 one test suite can use a particular fixture. Sometimes, however, multiple test
207 In GoogleTest, you share a fixture among test suites by putting the shared logic
208 in a base test fixture, then deriving from that base a separate fixture for each
210 tests using each derived fixture.
215 // Defines a base test fixture.
221 // Derives a fixture FooTest from BaseTest.
225 BaseTest::SetUp(); // Sets up the base fixture first.
231 BaseTest::TearDown(); // Remember to tear down the base fixture
[all …]
H A Dadvanced.md241 a method of the test fixture class. The one constraint is that assertions that
295 GTEST_SKIP() << "Skipping all tests for this fixture";
488 If a test fixture class is shared by normal tests and death tests, you can use
489 `using` or `typedef` to introduce an alias for the fixture class and avoid
838 fixture, you must add the `::testing::Test::` prefix, as in:
876 > `TEST` body and the test fixture class.
889 GoogleTest creates a new test fixture object for each test in order to make
898 1. In your test fixture class (say `FooTest` ), declare as `static` some member
900 2. Outside your test fixture class (typically just below it), define those
902 3. In the same test fixture class, define a public member function `static void
[all …]
/freebsd/contrib/googletest/googletest/test/
H A Dgtest-typed-test_test.cc43 // Used for testing that SetUpTestSuite()/TearDownTestSuite(), fixture
59 // members of this fixture class template public.
89 // Tests that SetUpTestSuite()/TearDownTestSuite(), fixture ctor/dtor,
96 // Static members of the fixture class template can be visited via in TYPED_TEST()
100 // Typedefs in the fixture class template can be visited via the in TYPED_TEST()
108 // Non-static members of the fixture class must be visited via in TYPED_TEST()
116 // Static members of the fixture class template can also be visited in TYPED_TEST()
255 // Tests that SetUpTestSuite()/TearDownTestSuite(), fixture ctor/dtor,
264 // Static members of the fixture class template can be visited via in TYPED_TEST_P()
268 // Non-static members of the fixture class must be visited via in TYPED_TEST_P()
[all …]
H A Dgtest_skip_test.cc42 class Fixture : public Test { class
45 GTEST_SKIP() << "skipping all tests for this fixture"; in SetUp()
49 TEST_F(Fixture, SkipsOneTest) { EXPECT_EQ(5, 7); } in TEST_F() argument
51 TEST_F(Fixture, SkipsAnotherTest) { EXPECT_EQ(99, 100); } in TEST_F() argument
H A Dgoogletest-output-test_.cc71 // HasFatalFailure() outside of a TEST, TEST_F, or test fixture. in TryTestSubroutine()
133 // fixture, the testing::Test:: prefix is not needed. in TEST()
355 // Tests non-fatal failures in the fixture constructor.
360 ADD_FAILURE() << "Expected failure #1, in the test fixture c'tor."; in NonFatalFailureInFixtureConstructorTest()
364 ADD_FAILURE() << "Expected failure #5, in the test fixture d'tor."; in ~NonFatalFailureInFixtureConstructorTest()
378 // Tests fatal failures in the fixture constructor.
387 ADD_FAILURE() << "Expected failure #2, in the test fixture d'tor."; in ~FatalFailureInFixtureConstructorTest()
392 << "We should never get here, as the test fixture c'tor " in SetUp()
398 << "We should never get here, as the test fixture c'tor " in TearDown()
403 void Init() { FAIL() << "Expected failure #1, in the test fixture c'tor."; } in Init()
[all …]
H A Dgoogletest-output-test-golden-lin.txt298 Expected failure #1, in the test fixture c'tor.
318 Expected failure #5, in the test fixture d'tor.
327 Expected failure #1, in the test fixture c'tor.
332 Expected failure #2, in the test fixture d'tor.
356 Expected failure #4, in the test fixture d'tor.
375 Expected failure #3, in the test fixture d'tor.
403 All tests in the same test suite must use the same test fixture
406 using two different test fixture classes. This can happen if
416 All tests in the same test suite must use the same test fixture
419 using two different test fixture classes. This can happen if
[all …]
H A Dgoogletest-catch-exceptions-test.py92 "in the test fixture's constructor"
99 "in the test fixture's destructor"
140 "in the test fixture's constructor"
162 "in the test fixture's destructor"
/freebsd/contrib/googletest/docs/reference/
H A Dtesting.md39 Defines an individual test named *`TestName`* that uses the test fixture class
44 the name of a test fixture class—see
60 test fixture class *`TestFixtureName`*. The test suite name is
65 the name of a value-parameterized test fixture class—see
145 Defines a typed test suite based on the test fixture *`TestFixtureName`*. The
148 The argument *`TestFixtureName`* is a fixture class template, parameterized by a
205 and `TestFixture` refers to the fixture class. See the following example:
214 // To visit static members of the fixture, add the 'TestFixture::'
218 // To refer to typedefs in the fixture, add the 'typename TestFixture::'
233 Defines a type-parameterized test suite based on the test fixture
[all …]

1234