Home | History | Annotate | Download | only in test

Lines Matching defs:EXPECTED

31  * You will find the expected results together with the test structures
130 * For easy creation of arrays of expected data. These macros correspond to
189 /* If decoding is expected to succeed, set this to 1, otherwise 0 */
481 } EXPECTED;
487 * 0 decoded structure wasn't what was expected (failure)
488 * 1 decoded structure was what was expected (success)
491 const EXPECTED *expected, size_t expected_size,
494 EXPECTED *enctst = NULL;
501 if (expected->success == 0) {
509 && memcmp(enctst, expected, expected_size) == 0)
523 * 0 encoded DER wasn't what was expected (failure)
524 * 1 encoded DER was what was expected (success)
526 static int do_encode(EXPECTED *input,
527 const unsigned char *expected, size_t expected_len,
539 || memcmp(data, expected, expected_len) != 0) {
555 static int do_enc_dec(EXPECTED *bytes, long nbytes,
672 const EXPECTED *expected, size_t expected_size,
686 ret = do_decode(encoding, encoding_length, expected, expected_size,
694 static int do_encode_custom(EXPECTED *input,
698 unsigned char *expected = NULL;
699 size_t expected_length = make_custom_der(custom_data, &expected, 0);
705 ret = do_encode(input, expected, expected_length, package);
706 OPENSSL_free(expected);
745 EXPECTED *expected
746 = (EXPECTED *)&((unsigned char *)package->encode_expectations)[pos];
748 switch (do_encode_custom(expected, &test_custom_data[i], package)) {
750 if (expected->success) {
769 switch (do_decode_custom(&test_custom_data[i], expected,
773 if (expected->success) {
798 EXPECTED *expected
799 = (EXPECTED *)&((unsigned char *)package->encdec_data)[pos];
801 switch (do_enc_dec(expected, package->encdec_data_elem_size, package)) {
803 if (expected->success) {