diff options
author | Pauli <paul.dale@oracle.com> | 2017-03-22 14:27:55 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2017-03-29 08:51:43 +1000 |
commit | 2fae041d6c507315a619e2f29bff86e44cc1d0a1 (patch) | |
tree | 916c82cafe8b198da5ca777b29ea4fab3f036f5b /test/cipherlist_test.c | |
parent | a6ac1ed686346d2164c16446624c973e51d3ae92 (diff) |
Test infrastructure additions.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3011)
Diffstat (limited to 'test/cipherlist_test.c')
-rw-r--r-- | test/cipherlist_test.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/cipherlist_test.c b/test/cipherlist_test.c index 0c344c9df3..0013994305 100644 --- a/test/cipherlist_test.c +++ b/test/cipherlist_test.c @@ -136,18 +136,14 @@ static int test_default_cipherlist(SSL_CTX *ctx) OPENSSL_assert(ciphers != NULL); num_expected_ciphers = OSSL_NELEM(default_ciphers_in_order); num_ciphers = sk_SSL_CIPHER_num(ciphers); - if (num_ciphers != num_expected_ciphers) { - fprintf(stderr, "Expected %d supported ciphers, got %d.\n", - num_expected_ciphers, num_ciphers); + if (!TEST_int_eq(num_ciphers, num_expected_ciphers)) goto err; - } for (i = 0; i < num_ciphers; i++) { expected_cipher_id = default_ciphers_in_order[i]; cipher_id = SSL_CIPHER_get_id(sk_SSL_CIPHER_value(ciphers, i)); - if (cipher_id != expected_cipher_id) { - fprintf(stderr, "Wrong cipher at position %d: expected %x, " - "got %x\n", i, expected_cipher_id, cipher_id); + if (!TEST_int_eq(cipher_id, expected_cipher_id)) { + TEST_info("Wrong cipher at position %d", i); goto err; } } |