ztest: mock: fix failed test printed message.

Corrected printed message on failing test with expected or received
NULL pointer in ztest_check_expected_data.

Signed-off-by: Stine Åkredalen <stine.akredalen@nordicsemi.no>
This commit is contained in:
Stine Åkredalen 2023-04-14 06:45:35 -07:00 committed by Anas Nashif
parent 9103dc4a97
commit 938c59c063

View file

@ -251,10 +251,10 @@ void z_ztest_check_expected_data(const char *fn, const char *name, void *data,
free_parameter(param);
if (expected == NULL && data != NULL) {
PRINT("%s:%s received null pointer\n", fn, name);
PRINT("%s:%s received data while expected null pointer\n", fn, name);
ztest_test_fail();
} else if (data == NULL && expected != NULL) {
PRINT("%s:%s received data while expected null pointer\n", fn,
PRINT("%s:%s received null pointer while expected data\n", fn,
name);
ztest_test_fail();
} else if (data != NULL) {