Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
criterion_test_extra_data Struct Reference

#include <types.h>

Data Fields

void(* init )(void)
 
void(* fini )(void)
 
int signal
 
int exit_code
 
bool disabled
 
const char * description
 
double timeout
 
void * data
 

Detailed Description

Contains all the options that can be set for a test, through the Test and TestSuite macros, or other means.

Definition at line 78 of file types.h.

Field Documentation

◆ data

void* criterion_test_extra_data::data

Extra user data.

This field is currently unused.

Definition at line 169 of file types.h.

◆ description

const char* criterion_test_extra_data::description

The long description of a test.

If a description is provided, it will be printed in test reports, and logged if the runner runs in verbose mode.

Definition at line 148 of file types.h.

◆ disabled

bool criterion_test_extra_data::disabled

If true, skips the test.

The test will still appear in the test list, but will be marked as skipped and will not be executed.

Definition at line 140 of file types.h.

◆ exit_code

int criterion_test_extra_data::exit_code

The expected exit status to be returned by the test.

By default, criterion exits the test process with a value of 0. If it is expected for the test to exit with a non-zero status, this option can be used.

Definition at line 132 of file types.h.

◆ fini

void(* criterion_test_extra_data::fini) (void)

The teardown test fixture.

This function, if provided, will be executed during the finalization of the test.

Definition at line 112 of file types.h.

◆ init

void(* criterion_test_extra_data::init) (void)

The setup test fixture.

This function, if provided, will be executed during the initialization of the test.

Definition at line 104 of file types.h.

◆ signal

int criterion_test_extra_data::signal

The expected signal to be raised by the test.

If the test does not raise the specified signal, then the test is marked as failed.

A value of 0 means that is it not expected for the test to raise any signal.

Definition at line 123 of file types.h.

◆ timeout

double criterion_test_extra_data::timeout

The timeout for the test, in seconds.

If the realtime execution of a test takes longer than the specified value, then the test is immediately aborted and reported as timing out.

A value of 0 is equivalent to +INFINITY and means that the test does not timeout.

It is unspecified behaviour for the value of timeout to be negative or NaN.

Definition at line 162 of file types.h.


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