ztest: Add Z_TEST_SKIP_IFNDEF macro
Add macro Z_TEST_SKIP_IFNDEF which is used when you want to skip test if configuration option is not enabled. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
ef2644d40d
commit
5b633db288
1 changed files with 11 additions and 0 deletions
|
@ -257,6 +257,17 @@ static inline void unit_test_noop(void)
|
|||
*/
|
||||
#define Z_TEST_SKIP_IFDEF(config) COND_CODE_1(config, (ztest_test_skip()), ())
|
||||
|
||||
/**
|
||||
* @brief Skips the test if config is not enabled
|
||||
*
|
||||
* Use this macro at the start of your test case, to skip it when
|
||||
* config is not enabled. Useful when your need to skip test if some
|
||||
* conifiguration option is not enabled.
|
||||
*
|
||||
* @param config The Kconfig option used to skip the test (if not enabled).
|
||||
*/
|
||||
#define Z_TEST_SKIP_IFNDEF(config) COND_CODE_1(config, (), (ztest_test_skip()))
|
||||
|
||||
/**
|
||||
* @brief Create and register a new unit test.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue