1 /* Copyright (c) 2023 Nordic Semiconductor ASA
2 * SPDX-License-Identifier: Apache-2.0
3 */
4
5 #include <bs_tracing.h>
6 #include <bstests.h>
7
8 #define PASS(...) \
9 do { \
10 extern enum bst_result_t bst_result; \
11 bst_result = Passed; \
12 bs_trace_info_time(1, __VA_ARGS__); \
13 } while (0)
14
bt_testlib_expect_zero(int err,char * where_file,int where_line)15 static inline void bt_testlib_expect_zero(int err, char *where_file, int where_line)
16 {
17 if (err) {
18 bs_trace_print(BS_TRACE_ERROR, where_file, where_line, 0, BS_TRACE_AUTOTIME, 0,
19 "err %d\n", err);
20 }
21 }
22
23 #define EXPECT_ZERO(expr) bt_testlib_expect_zero((expr), __FILE__, __LINE__)
24