1 /*
2  * Copyright (c) 2023 Legrand North America, LLC.
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_TESTS_SUBSYS_TESTSUITE_FFF_FAKE_CONTEXTS_INCLUDE_ZEPHYR_CODE_UNDER_TEST_H_
8 #define ZEPHYR_TESTS_SUBSYS_TESTSUITE_FFF_FAKE_CONTEXTS_INCLUDE_ZEPHYR_CODE_UNDER_TEST_H_
9 
10 #include <errno.h>
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 /**
17  * @brief Opens and closes called_API session twice
18  *
19  * This routine loops twice on opening/closing a called_API session.
20  * Failures cause early termination of the loop, and the error number
21  * from the called routine is returned by this routine.  This routine
22  * is designed for exercising custom_fake routines that need to use
23  * call-specific data.
24  *
25  * @return zero(0) upon success
26  * @return -EINVAL if invalid parameter(s)
27  * @return -E2BIG  if more calls were made than expected.
28  */
29 int code_under_test(void);
30 
31 #ifdef __cplusplus
32 }
33 #endif
34 
35 #endif /* ZEPHYR_TESTS_SUBSYS_TESTSUITE_FFF_FAKE_CONTEXTS_INCLUDE_ZEPHYR_CODE_UNDER_TEST_H_ */
36