Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
ztest_mock.h File Reference

Ztest mocking support. More...

Go to the source code of this file.

Macros

#define ztest_expect_value(func, param, value)
 Tell function func to expect the value value for param. More...
 
#define ztest_check_expected_value(param)
 If param doesn't match the value set by ztest_expect_value(), fail the test. More...
 
#define ztest_expect_data(func, param, data)    z_ztest_expect_data(STRINGIFY(func), STRINGIFY(param), (void *)(data))
 Tell function func to expect the data data for param. More...
 
#define ztest_check_expected_data(param, length)
 If data pointed by param don't match the data set by ztest_expect_data(), fail the test. More...
 
#define ztest_return_data(func, param, data)    z_ztest_return_data(STRINGIFY(func), STRINGIFY(param), (void *)(data))
 Tell function func to return the data data for param. More...
 
#define ztest_copy_return_data(param, length)
 Copy the data set by ztest_return_data to the memory pointed by param. More...
 
#define ztest_returns_value(func, value)    z_ztest_returns_value(STRINGIFY(func), (uintptr_t)(value))
 Tell func that it should return value. More...
 
#define ztest_get_return_value()   z_ztest_get_return_value(__func__)
 Get the return value for current function. More...
 
#define ztest_get_return_value_ptr()    ((void *)z_ztest_get_return_value(__func__))
 Get the return value as a pointer for current function. More...
 

Detailed Description

Ztest mocking support.