Move TEST_AVAILABLE_ECC into ssl_helpers.h
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
diff --git a/tests/include/test/ssl_helpers.h b/tests/include/test/ssl_helpers.h
index eb89d19..9d88ad1 100644
--- a/tests/include/test/ssl_helpers.h
+++ b/tests/include/test/ssl_helpers.h
@@ -539,6 +539,25 @@
TEST_EQUAL(ret, exp_ret_val)
#endif /* MBEDTLS_USE_PSA_CRYPTO */
+#define TEST_AVAILABLE_ECC(tls_id_, group_id_, psa_family_, psa_bits_) \
+ TEST_EQUAL(mbedtls_ssl_get_ecp_group_id_from_tls_id(tls_id_), \
+ group_id_); \
+ TEST_EQUAL(mbedtls_ssl_get_tls_id_from_ecp_group_id(group_id_), \
+ tls_id_); \
+ TEST_EQUAL(mbedtls_ssl_get_psa_curve_info_from_tls_id(tls_id_, \
+ &psa_family, &psa_bits), PSA_SUCCESS); \
+ TEST_EQUAL(psa_family_, psa_family); \
+ TEST_EQUAL(psa_bits_, psa_bits);
+
+#define TEST_UNAVAILABLE_ECC(tls_id_, group_id_, psa_family_, psa_bits_) \
+ TEST_EQUAL(mbedtls_ssl_get_ecp_group_id_from_tls_id(tls_id_), \
+ MBEDTLS_ECP_DP_NONE); \
+ TEST_EQUAL(mbedtls_ssl_get_tls_id_from_ecp_group_id(group_id_), \
+ 0); \
+ TEST_EQUAL(mbedtls_ssl_get_psa_curve_info_from_tls_id(tls_id_, \
+ &psa_family, &psa_bits), \
+ PSA_ERROR_NOT_SUPPORTED);
+
#endif /* MBEDTLS_SSL_TLS_C */
#endif /* SSL_HELPERS_H */