Skip to content
Commit 36f74e98 authored by Michał Barnaś's avatar Michał Barnaś Committed by Anas Nashif
Browse files

ztest: remove msg parameter from zassert_* and zassume_* macros



This commit removes the requirement for msg parameter in zassert_*
and zassume_* macros. It will allow to use them without sending NULL
as the last parameter.

The default messages look like:

void* beauty_ptr = NULL;
zassert_not_null(beauty_ptr);
=>
Assertion failed at main.c:20: suite_test: beauty_ptr is NULL

void* ugly_ptr = (void*)0xbaadf00d;
zassume_is_null(ugly_ptr);
=>
Assumption failed at main.c:23: suite_test: ugly_ptr is not NULL

int apple = 3;
int tomato = 9;
zassume_equal(apple, tomato);
=>
Assumption failed at main.c:27: suite_test: apple not equal to tomato

Signed-off-by: default avatarMichał Barnaś <mb@semihalf.com>
parent 305ee181
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment