13#ifndef ZEPHYR_TESTSUITE_ZTEST_MOCK_H_
14#define ZEPHYR_TESTSUITE_ZTEST_MOCK_H_
36#define ztest_expect_value(func, param, value) \
37 z_ztest_expect_value(STRINGIFY(func), STRINGIFY(param), \
51#define ztest_check_expected_value(param) \
52 z_ztest_check_expected_value(__func__, STRINGIFY(param), \
67#define ztest_expect_data(func, param, data) \
68 z_ztest_expect_data(STRINGIFY(func), STRINGIFY(param), (void *)(data))
82#define ztest_check_expected_data(param, length) \
83 z_ztest_check_expected_data(__func__, STRINGIFY(param), \
84 (void *)(param), (length))
97#define ztest_return_data(func, param, data) \
98 z_ztest_return_data(STRINGIFY(func), STRINGIFY(param), (void *)(data))
110#define ztest_copy_return_data(param, length) \
111 z_ztest_copy_return_data(__func__, STRINGIFY(param), \
112 (void *)(param), (length))
119#define ztest_returns_value(func, value) \
120 z_ztest_returns_value(STRINGIFY(func), (uintptr_t)(value))
130#define ztest_get_return_value() z_ztest_get_return_value(__func__)
140#define ztest_get_return_value_ptr() \
141 ((void *)z_ztest_get_return_value(__func__))
147#ifdef CONFIG_ZTEST_MOCKING
155void z_init_mock(
void);
156int z_cleanup_mock(
void);
158void z_ztest_expect_value(
const char *fn,
const char *name,
uintptr_t value);
159void z_ztest_check_expected_value(
const char *fn,
const char *param,
162void z_ztest_expect_data(
const char *fn,
const char *name,
void *val);
163void z_ztest_check_expected_data(
const char *fn,
const char *name,
void *data,
166void z_ztest_return_data(
const char *fn,
const char *name,
void *val);
167void z_ztest_copy_return_data(
const char *fn,
const char *name,
void *data,
170void z_ztest_returns_value(
const char *fn,
uintptr_t value);
171uintptr_t z_ztest_get_return_value(
const char *fn);
180#define z_cleanup_mock() 0
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINTPTR_TYPE__ uintptr_t
Definition: stdint.h:105