test/exptest.c: stop marking progress with a period
[openssl.git] / test / cipherlist_test.c
index 0c344c9df32358eabda72c5803e11a778df6ba32..61551d92235e0ae49c5c81180fa1599d8fe91f38 100644 (file)
@@ -18,7 +18,6 @@
 #include <openssl/tls1.h>
 
 #include "e_os.h"
-#include "test_main.h"
 #include "testutil.h"
 
 typedef struct cipherlist_test_fixture {
@@ -34,7 +33,7 @@ static CIPHERLIST_TEST_FIXTURE set_up(const char *const test_case_name)
     fixture.test_case_name = test_case_name;
     fixture.server = SSL_CTX_new(TLS_server_method());
     fixture.client = SSL_CTX_new(TLS_client_method());
-    OPENSSL_assert(fixture.client != NULL && fixture.server != NULL);
+    TEST_check(fixture.client != NULL && fixture.server != NULL);
     return fixture;
 }
 
@@ -130,24 +129,20 @@ static int test_default_cipherlist(SSL_CTX *ctx)
     uint32_t expected_cipher_id, cipher_id;
 
     ssl = SSL_new(ctx);
-    OPENSSL_assert(ssl != NULL);
+    TEST_check(ssl != NULL);
 
     ciphers = SSL_get1_supported_ciphers(ssl);
-    OPENSSL_assert(ciphers != NULL);
+    TEST_check(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;
         }
     }
@@ -187,8 +182,8 @@ static int test_default_cipherlist_implicit()
 static int test_default_cipherlist_explicit()
 {
     SETUP_CIPHERLIST_TEST_FIXTURE();
-    OPENSSL_assert(SSL_CTX_set_cipher_list(fixture.server, "DEFAULT"));
-    OPENSSL_assert(SSL_CTX_set_cipher_list(fixture.client, "DEFAULT"));
+    TEST_check(SSL_CTX_set_cipher_list(fixture.server, "DEFAULT"));
+    TEST_check(SSL_CTX_set_cipher_list(fixture.client, "DEFAULT"));
     EXECUTE_CIPHERLIST_TEST();
 }