| /freebsd/crypto/openssl/test/ |
| H A D | cmp_protect_test.c | 39 static void tear_down(CMP_PROTECT_TEST_FIXTURE *fixture) in tear_down() argument 41 if (fixture != NULL) { in tear_down() 42 OSSL_CMP_CTX_free(fixture->cmp_ctx); in tear_down() 43 OSSL_CMP_MSG_free(fixture->msg); in tear_down() 44 OSSL_CMP_PKISI_free(fixture->si); in tear_down() 46 OPENSSL_free(fixture->mem); in tear_down() 47 sk_X509_free(fixture->certs); in tear_down() 48 sk_X509_free(fixture->chain); in tear_down() 50 OPENSSL_free(fixture); in tear_down() 56 CMP_PROTECT_TEST_FIXTURE *fixture; in set_up() local [all …]
|
| H A D | cmp_msg_test.c | 38 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 D | cmp_vfy_test.c | 43 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_trusted(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 D | ct_test.c | 62 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->ctlog_store); in set_up() 77 OPENSSL_free(fixture); in set_up() [all …]
|
| H A D | cmp_hdr_test.c | 24 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->hdr = OSSL_CMP_PKIHEADER_new())) in set_up() 42 return fixture; in set_up() [all …]
|
| H A D | cmp_client_test.c | 46 static void tear_down(CMP_SES_TEST_FIXTURE *fixture) in tear_down() argument 48 OSSL_CMP_CTX_free(fixture->cmp_ctx); in tear_down() 49 ossl_cmp_mock_srv_free(fixture->srv_ctx); in tear_down() 50 sk_X509_free(fixture->caPubs); in tear_down() 51 OPENSSL_free(fixture); in tear_down() 56 CMP_SES_TEST_FIXTURE *fixture; in set_up() local 60 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up() 62 fixture->test_case_name = test_case_name; in set_up() 63 if (!TEST_ptr(fixture->srv_ctx = ossl_cmp_mock_srv_new(libctx, NULL)) in set_up() 64 || !OSSL_CMP_SRV_CTX_set_accept_unprotected(fixture->srv_ctx, 1) in set_up() [all …]
|
| H A D | cmp_asn_test.c | 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 [all …]
|
| H A D | ssl_test_ctx_test.c | 111 SSL_TEST_CTX_TEST_FIXTURE *fixture; in set_up() local 113 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up() 115 fixture->test_case_name = test_case_name; in set_up() 116 if (!TEST_ptr(fixture->expected_ctx = SSL_TEST_CTX_new(NULL))) { in set_up() 117 OPENSSL_free(fixture); in set_up() 120 return fixture; in set_up() 123 static int execute_test(SSL_TEST_CTX_TEST_FIXTURE *fixture) in execute_test() argument 128 if (!TEST_ptr(ctx = SSL_TEST_CTX_create(conf, fixture->test_section, in execute_test() 129 fixture->expected_ctx->libctx)) in execute_test() 130 || !testctx_eq(ctx, fixture->expected_ctx)) in execute_test() [all …]
|
| H A D | cipherlist_test.c | 30 static void tear_down(CIPHERLIST_TEST_FIXTURE *fixture) in tear_down() argument 32 if (fixture != NULL) { in tear_down() 33 SSL_CTX_free(fixture->server); in tear_down() 34 SSL_CTX_free(fixture->client); in tear_down() 35 fixture->server = fixture->client = NULL; in tear_down() 36 OPENSSL_free(fixture); in tear_down() 42 CIPHERLIST_TEST_FIXTURE *fixture; in set_up() local 44 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up() 46 fixture->test_case_name = test_case_name; in set_up() 47 if (!TEST_ptr(fixture->server = SSL_CTX_new(TLS_server_method())) in set_up() [all …]
|
| H A D | cmp_status_test.c | 24 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() 40 static int execute_PKISI_test(CMP_STATUS_TEST_FIXTURE *fixture) in execute_PKISI_test() argument 47 if (!TEST_ptr(si = OSSL_CMP_STATUSINFO_new(fixture->pkistatus, in execute_PKISI_test() 48 fixture->pkifailure, in execute_PKISI_test() 49 fixture->text))) in execute_PKISI_test() [all …]
|
| H A D | cmp_server_test.c | 25 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 D | keymgmt_internal_test.c | 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() 53 FIXTURE *fixture; in set_up() local 55 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture))) in set_up() 56 || !TEST_ptr(fixture->ctx1 = OSSL_LIB_CTX_new()) in set_up() [all …]
|
| H A D | cmp_ctx_test.c | 21 static void tear_down(OSSL_CMP_CTX_TEST_FIXTURE *fixture) in tear_down() argument 23 if (fixture != NULL) in tear_down() 24 OSSL_CMP_CTX_free(fixture->ctx); in tear_down() 25 OPENSSL_free(fixture); in tear_down() 30 OSSL_CMP_CTX_TEST_FIXTURE *fixture; in set_up() local 32 if (!TEST_ptr(fixture = OPENSSL_zalloc(sizeof(*fixture)))) in set_up() 34 if (!TEST_ptr(fixture->ctx = OSSL_CMP_CTX_new(NULL, NULL))) { in set_up() 35 tear_down(fixture); in set_up() 38 fixture->test_case_name = test_case_name; in set_up() 39 return fixture; in set_up() [all …]
|
| H A D | modes_internal_test.c | 185 static int execute_cts128(const CTS128_FIXTURE *fixture, int num) in execute_cts128() argument 199 TEST_info("%s_vector_%lu", fixture->case_name, (unsigned long)len); in execute_cts128() 201 tail = fixture->last_blocks_correction(orig_vector, vector, len); in execute_cts128() 205 if (!TEST_size_t_eq(fixture->encrypt_block(test_input, ciphertext, len, in execute_cts128() 215 size = fixture->decrypt_block(ciphertext, cleartext, len, in execute_cts128() 225 if (!TEST_size_t_eq(fixture->encrypt_stream(test_input, ciphertext, len, in execute_cts128() 235 if (!TEST_size_t_eq(fixture->decrypt_stream(ciphertext, cleartext, len, in execute_cts128()
|
| H A D | testutil.h | 100 TEST_FIXTURE_TYPE *fixture = set_up(TEST_CASE_NAME); \ 103 if (fixture == NULL) \ 107 if (fixture != NULL) { \ 108 result = execute_func(fixture); \ 109 tear_down(fixture); \
|
| /freebsd/contrib/googletest/docs/ |
| H A D | primer.md | 92 *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 D | faq.md | 197 ## 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 D | samples.md | 11 * Sample #3 uses a test fixture. 14 * Sample #5 puts shared testing logic in a base test fixture, and reuses it in
|
| H A D | advanced.md | 241 a method of the test fixture class. The one constraint is that assertions that 295 GTEST_SKIP() << "Skipping all tests for this fixture"; 539 If a test fixture class is shared by normal tests and death tests, you can use 540 `using` or `typedef` to introduce an alias for the fixture class and avoid 844 fixture, you must add the `::testing::Test::` prefix, as in: 882 > `TEST` body and the test fixture class. 895 GoogleTest creates a new test fixture object for each test in order to make 904 1. In your test fixture class (say `FooTest` ), declare as `static` some member 906 2. Outside your test fixture class (typically just below it), define those 908 3. In the same test fixture class, define a public member function `static void [all …]
|
| H A D | gmock_faq.md | 232 fixture's set-up phase) and customize it with more specific rules later. If
|
| H A D | gmock_for_dummies.md | 553 expectations in a mock object's constructor or the test fixture's set-up phase
|
| /freebsd/contrib/googletest/docs/reference/ |
| H A D | testing.md | 39 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 147 required by your fixture class. 149 For example, you can do the following with a fixture that requires an `int` 164 automatically deduce the target type (your fixture's parameter type), but 167 `T` should not be your fixture's parameter type, but rather an intermediate type 169 fixture's parameter type: 172 // The fixture's parameter type. [all …]
|
| /freebsd/contrib/googletest/googletest/test/ |
| H A D | googletest-output-test-golden-lin.txt | 298 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 …]
|
| /freebsd/tests/ |
| H A D | conftest.py | 53 @pytest.fixture(autouse=True, scope="session")
|
| /freebsd/contrib/llvm-project/llvm/lib/Target/M68k/ |
| H A D | M68kInstrInfo.td | 573 // vt: Type of data this fixture refers to
|