1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #ifndef SCP_UT_UTILS_H
9 #define SCP_UT_UTILS_H
10 
11 #define UNITY_UT_TEST
12 
13 extern int _ut_unit_status;
14 extern int _ut_fail_line_no;
15 
16 #define UT_FAILED  (1U)
17 #define UT_SUCCESS (0U)
18 #define UT_UTILS_MARK_FAILED() \
19     do { \
20         _ut_unit_status = UT_FAILED; \
21         _ut_fail_line_no = __LINE__; \
22     } while (0)
23 
24 #define UT_GET_STATUS()      (_ut_unit_status)
25 #define UT_GET_FAILED_LINE() (_ut_fail_line_no)
26 
27 #endif /* SCP_UT_UTILS_H */
28