From cfa0fd5827d9094eb6ff236687141d06eac8a5cb Mon Sep 17 00:00:00 2001 From: Kazuho Oku Date: Tue, 13 Aug 2024 10:08:41 +0900 Subject: [PATCH] use subtest for structured output --- t/openssl.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/t/openssl.c b/t/openssl.c index 3c88373f..b8fe3917 100644 --- a/t/openssl.c +++ b/t/openssl.c @@ -124,22 +124,22 @@ static void test_bf(void) static void test_key_exchanges(void) { - test_key_exchange(&ptls_openssl_secp256r1, &ptls_openssl_secp256r1); - test_key_exchange(&ptls_openssl_secp256r1, &ptls_minicrypto_secp256r1); - test_key_exchange(&ptls_minicrypto_secp256r1, &ptls_openssl_secp256r1); + subtest("secp256r1-self", test_key_exchange, &ptls_openssl_secp256r1, &ptls_openssl_secp256r1); + subtest("secp256r1-to-minicrypto", test_key_exchange, &ptls_openssl_secp256r1, &ptls_minicrypto_secp256r1); + subtest("secp256r1-from-minicrypto", test_key_exchange, &ptls_minicrypto_secp256r1, &ptls_openssl_secp256r1); #if PTLS_OPENSSL_HAVE_SECP384R1 - test_key_exchange(&ptls_openssl_secp384r1, &ptls_openssl_secp384r1); + subtest("secp384r1", test_key_exchange, &ptls_openssl_secp384r1, &ptls_openssl_secp384r1); #endif #if PTLS_OPENSSL_HAVE_SECP521R1 - test_key_exchange(&ptls_openssl_secp521r1, &ptls_openssl_secp521r1); + subtest("secp521r1", test_key_exchange, &ptls_openssl_secp521r1, &ptls_openssl_secp521r1); #endif #if PTLS_OPENSSL_HAVE_X25519 - test_key_exchange(&ptls_openssl_x25519, &ptls_openssl_x25519); - test_key_exchange(&ptls_openssl_x25519, &ptls_minicrypto_x25519); - test_key_exchange(&ptls_minicrypto_x25519, &ptls_openssl_x25519); + subtest("x25519-self", test_key_exchange, &ptls_openssl_x25519, &ptls_openssl_x25519); + subtest("x25519-to-minicrypto", test_key_exchange, &ptls_openssl_x25519, &ptls_minicrypto_x25519); + subtest("x25519-from-minicrypto", test_key_exchange, &ptls_minicrypto_x25519, &ptls_openssl_x25519); #endif }