Zephyr API Documentation  3.0.0
A Scalable Open Source RTOS
3.0.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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_stats stats
 
void *(* setup )(void)
 
void(* before )(void *data)
 
void(* after )(void *data)
 
void(* teardown )(void *data)
 

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(* 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(* 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

const char * ztest_suite_node::name

The name of the test suite.

◆ predicate

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.

◆ setup

void *(* 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

struct ztest_suite_stats ztest_suite_node::stats

Stats

◆ suite

struct unit_test* ztest_suite_node::suite

Pointer to the test suite.

◆ teardown

void(* 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: