Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
Parameterized test & generator macros

Macros

#define ParameterizedTest(Type, Suite, Name, ...)   internal
 
#define ParameterizedTestParameters(Suite, Name)   internal
 
#define cr_make_param_array(Type, Array, Len, Cleanup)   internal
 

Detailed Description

Macro Definition Documentation

◆ cr_make_param_array

#define cr_make_param_array ( Type,
Array,
Len,
Cleanup )   internal

Constructs a parameter list used as a return value for a parameter generator.

This is only recommended for C sources. For C++, use criterion::parameters or criterion_test_params.

Parameters
TypeThe type of the array subscript.
ArrayThe array of parameters.
LenThe length of the array.
CleanupThe optional cleanup function for the array.
Returns
The parameter list.

Definition at line 80 of file parameterized.h.

◆ ParameterizedTest

#define ParameterizedTest ( Type,
Suite,
Name,
... )   internal

ParameterizedTest(Type *param, Suite, Name, [Options...]) { Function Body }

Defines a new parameterized test.

A parameterized test only takes one parameter – to pass multiple parameters, use a structure type.

Parameters
TypeThe type of the parameter.
SuiteThe name of the test suite containing this test.
NameThe name of the test.
...An optional sequence of designated initializer key/value pairs as described in the criterion_test_extra_data structure (see criterion/types.h). Example: .exit_code = 1

Definition at line 55 of file parameterized.h.

◆ ParameterizedTestParameters

#define ParameterizedTestParameters ( Suite,
Name )   internal

Defines the parameter generator prototype for the associated parameterized test.

Parameters
SuiteThe name of the test suite containing the test.
TestThe name of the test.
Returns
A constructed instance of criterion::parameters, or the result of the cr_make_param_array macro.

Definition at line 66 of file parameterized.h.