Zephyr Project API  3.1.0
A Scalable Open Source RTOS
ztest_suite_node Struct Reference

#include <ztest_test_deprecated.h>

Data Fields

const char * name
 
struct unit_testsuite
 
bool(* predicate )(const void *state)
 
struct ztest_suite_statsstats
 
const char *const name
 
void *(*const setup )(void)
 
void(*const before )(void *data)
 
void(*const after )(void *data)
 
void(*const teardown )(void *data)
 
bool(*const predicate )(const void *state)
 
struct ztest_suite_stats *const stats
 

Detailed Description

A single node of test suite. Each node should be added to a single linker section which will allow ztest_run_registered_test_suites() to iterate over the various nodes.

A single node of test suite. Each node should be added to a single linker section which will allow ztest_run_test_suites() to iterate over the various nodes.

Field Documentation

◆ after

void(*const ztest_suite_node::after) (void *data)

Function to run after each test in this suite

Parameters
dataThe test suite's data returned from setup()

◆ before

void(*const ztest_suite_node::before) (void *data)

Function to run before each test in this suite

Parameters
dataThe test suite's data returned from setup()

◆ name [1/2]

const char* ztest_suite_node::name

The name of the test suite.

◆ name [2/2]

const char* const ztest_suite_node::name

The name of the test suite.

◆ predicate [1/2]

bool(* ztest_suite_node::predicate) (const void *state)

An optional predicate function to determine if the test should run. If NULL, then the test will only run once on the first attempt.

Parameters
stateThe current state of the test application.
Returns
True if the suite should be run; false to skip.

◆ predicate [2/2]

bool(*const ztest_suite_node::predicate) (const void *state)

An optional predicate function to determine if the test should run. If NULL, then the test will only run once on the first attempt.

Parameters
stateThe current state of the test application.
Returns
True if the suite should be run; false to skip.

◆ setup

void *(*const ztest_suite_node::setup) (void)

Setup function to run before running this suite

Returns
Pointer to the data structure that will be used throughout this test suite

◆ stats [1/2]

struct ztest_suite_stats* ztest_suite_node::stats

Stats

◆ stats [2/2]

struct ztest_suite_stats* const ztest_suite_node::stats

Stats

◆ suite

struct unit_test* ztest_suite_node::suite

Pointer to the test suite.

◆ teardown

void(*const ztest_suite_node::teardown) (void *data)

Teardown function to run after running this suite

Parameters
dataThe test suite's data returned from setup()

The documentation for this struct was generated from the following files: