diff --git a/subsys/testsuite/ztest/include/ztest_assert.h b/subsys/testsuite/ztest/include/ztest_assert.h index b1d7f163f07..54b33cf96c7 100644 --- a/subsys/testsuite/ztest/include/ztest_assert.h +++ b/subsys/testsuite/ztest/include/ztest_assert.h @@ -18,6 +18,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { @@ -26,9 +27,9 @@ extern "C" { void ztest_test_fail(void); #if CONFIG_ZTEST_ASSERT_VERBOSE == 0 -static inline void z_zassert_(int cond, const char *file, int line) +static inline void z_zassert_(bool cond, const char *file, int line) { - if (!(cond)) { + if (cond == false) { PRINT("\n Assertion failed at %s:%d\n", file, line); ztest_test_fail(); @@ -40,13 +41,13 @@ static inline void z_zassert_(int cond, const char *file, int line) #else /* CONFIG_ZTEST_ASSERT_VERBOSE != 0 */ -static inline void z_zassert(int cond, +static inline void z_zassert(bool cond, const char *default_msg, const char *file, int line, const char *func, const char *msg, ...) { - if (!(cond)) { + if (cond == false) { va_list vargs; va_start(vargs, msg);