File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
tests/bsim/babblekit/include/babblekit Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1919#define DECLARE_FLAG (flag ) extern atomic_t flag
2020
2121/* Define a new binary flag.
22- * Declare them static if defining flags with the same name in multiple files.
22+ * Use @ref DEFINE_FLAG_STATIC if defining flags with the same name in multiple files.
2323 *
2424 * @param flag Name of the flag
2525 */
2626#define DEFINE_FLAG (flag ) atomic_t flag = (atomic_t) false
2727
28+ /* Define a new, static binary flag.
29+ *
30+ * @param flag Name of the flag
31+ */
32+ #define DEFINE_FLAG_STATIC (flag ) static atomic_t flag = (atomic_t) false
33+
2834#define SET_FLAG (flag ) (void)atomic_set(&flag, (atomic_t) true)
2935#define UNSET_FLAG (flag ) (void)atomic_set(&flag, (atomic_t) false)
3036
Original file line number Diff line number Diff line change @@ -95,6 +95,17 @@ extern enum bst_result_t bst_result;
9595 } \
9696 } while (0)
9797
98+ /*
99+ * @brief Assert `expr` is true
100+ *
101+ * Assert that `expr` is true. If assertion is false, fail the test. I.e. return non-zero.
102+ *
103+ * @note This is different than `sys/__assert.h`.
104+ *
105+ */
106+ #define TEST_ASSERT_NO_MSG (expr ) \
107+ TEST_ASSERT(expr, "")
108+
98109/*
99110 * @brief Print a value. Lower-level than `printk` or `LOG_xx`.
100111 *
You can’t perform that action at this time.
0 commit comments