diff mbox

[PATCHv3,2/7] validation: crypto: add unit tests for strong type display functions

Message ID 1425855170-4191-2-git-send-email-bill.fischofer@linaro.org
State Accepted
Commit a1951ec170b083ab22bdca1869b8c3f7bf4895d0
Headers show

Commit Message

Bill Fischofer March 8, 2015, 10:52 p.m. UTC
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 test/validation/crypto/odp_crypto_test_async_inp.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/test/validation/crypto/odp_crypto_test_async_inp.c b/test/validation/crypto/odp_crypto_test_async_inp.c
index 9e4e9f1..feefd49 100644
--- a/test/validation/crypto/odp_crypto_test_async_inp.c
+++ b/test/validation/crypto/odp_crypto_test_async_inp.c
@@ -60,6 +60,8 @@  static void alg_test(enum odp_crypto_op op,
 	rc = odp_crypto_session_create(&ses_params, &session, &status);
 	CU_ASSERT(!rc);
 	CU_ASSERT(status == ODP_CRYPTO_SES_CREATE_ERR_NONE);
+	CU_ASSERT(odp_crypto_session_to_u64(session) !=
+		  odp_crypto_session_to_u64(ODP_CRYPTO_SESSION_INVALID));
 
 	/* Prepare input data */
 	odp_packet_t pkt = odp_packet_alloc(pool, input_vec_len);
@@ -103,6 +105,8 @@  static void alg_test(enum odp_crypto_op op,
 	} while (event == ODP_EVENT_INVALID);
 
 	compl_event = odp_crypto_compl_from_event(event);
+	CU_ASSERT(odp_crypto_compl_to_u64(compl_event) ==
+		  odp_crypto_compl_to_u64(odp_crypto_compl_from_event(event)));
 	odp_crypto_compl_result(compl_event, &result);
 	odp_crypto_compl_free(compl_event);