1 /*
2  * Copyright (c) 2022 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/kernel.h>
8 #include "mocks/aes.h"
9 #include "mocks/aes_expects.h"
10 
expect_single_call_psa_cipher_encrypt(uint8_t * out)11 void expect_single_call_psa_cipher_encrypt(uint8_t *out)
12 {
13 	const char *func_name = "psa_cipher_encrypt";
14 
15 	zassert_equal(psa_cipher_encrypt_fake.call_count, 1, "'%s()' was called more than once",
16 		      func_name);
17 
18 	zassert_not_equal(psa_cipher_encrypt_fake.arg1_val, 0,
19 			 "'%s()' was called with incorrect '%s' value", func_name, "arg1");
20 	zassert_not_equal(psa_cipher_encrypt_fake.arg3_val, 0,
21 			 "'%s()' was called with incorrect '%s' value", func_name, "arg3");
22 	zassert_equal_ptr(psa_cipher_encrypt_fake.arg4_val, out,
23 			 "'%s()' was called with incorrect '%s' value", func_name, "arg4");
24 	zassert_not_equal(psa_cipher_encrypt_fake.arg5_val, 0,
25 			 "'%s()' was called with incorrect '%s' value", func_name, "arg5");
26 }
27