subsys/testsuite/ztest: Fix zassert_mem_equal user message printing
This commit fixes the zassert_mem_equal macro to properly print the formatting string is given as a parameter by the user. There is an error that is an effect of directly copying the previous implementation that was using the inline function. Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
This commit is contained in:
parent
6a6264e497
commit
8ab22556f6
|
@ -206,8 +206,8 @@ static inline void z_zassert(int cond,
|
|||
* @param size Size of buffers
|
||||
* @param msg Optional message to print if the assertion fails
|
||||
*/
|
||||
#define zassert_mem_equal__(buf, exp, size, msg, ...) \
|
||||
zassert_equal(memcmp(buf, exp, size), 0, #buf " not equal to " #exp, \
|
||||
#define zassert_mem_equal__(buf, exp, size, msg, ...) \
|
||||
zassert(memcmp(buf, exp, size) == 0, #buf " not equal to " #exp, \
|
||||
msg, ##__VA_ARGS__)
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue