|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Parameter value set for value-parameterized tests. More...
#include </__w/zephyr/zephyr/subsys/testsuite/ztest/include/zephyr/ztest_test.h>
Data Fields | |
| const void * | values |
Pointer to the array of parameter values (NULL when value_at_cb is set). | |
| size_t | count |
Number of parameter values (or invocations when value_at_cb is set). | |
| size_t | elem_size |
| Size in bytes of each individual parameter value. | |
| const char *(* | name_cb )(size_t index, const void *value) |
Optional callback returning a human-readable name for the value at index. | |
| void(* | value_at_cb )(size_t index, void *out) |
| Optional value generator for range-based or runtime parameters. | |
| void(* | setup_cb )(void) |
| Optional one-time setup called before the dispatch loop. | |
Parameter value set for value-parameterized tests.
| size_t ztest_param_values::count |
Number of parameter values (or invocations when value_at_cb is set).
| size_t ztest_param_values::elem_size |
Size in bytes of each individual parameter value.
| const char *(* ztest_param_values::name_cb) (size_t index, const void *value) |
Optional callback returning a human-readable name for the value at index.
| void(* ztest_param_values::setup_cb) (void) |
Optional one-time setup called before the dispatch loop.
When non-NULL, invoked exactly once per parameterized test dispatch before the first value is produced. Useful for seeding a PRNG, resetting stateful generators, or any other per-test-run initialisation. May be NULL.
Use ZTEST_DEFINE_PARAM_GENERATOR_WITH_SETUP() to set this field.
| void(* ztest_param_values::value_at_cb) (size_t index, void *out) |
Optional value generator for range-based or runtime parameters.
When non-NULL, called once per invocation with the 0-based index and a pointer to an aligned scratch buffer of at least elem_size bytes. The callback must write exactly elem_size bytes into out. values must be NULL when this callback is provided.
Use ZTEST_DEFINE_PARAM_RANGE() or ZTEST_DEFINE_PARAM_GENERATOR() instead of setting this directly.
| const void* ztest_param_values::values |
Pointer to the array of parameter values (NULL when value_at_cb is set).