Loading...
Searching...
No Matches
Test Utils Result Output Implementation API

The turo API that must have an implementation. More...

Detailed Description

The turo API that must have an implementation.

Typedefs

typedef struct turo turo_t
 Type for a TURO object.
 

Functions

void turo_init (turo_t *ctx)
 Provides initial values for the turo context.
 
void turo_container_open (turo_t *ctx)
 Outputs a container open.
 
void turo_s32 (turo_t *ctx, int32_t val)
 Outputs a signed 32 bit integer.
 
void turo_u32 (turo_t *ctx, uint32_t val)
 Outputs an unsigned 32 bit integer.
 
void turo_s64 (turo_t *ctx, int64_t val)
 Outputs a signed 64 bit integer.
 
void turo_u64 (turo_t *ctx, uint64_t val)
 Outputs a formatted result unsigned 64 bit integer.
 
void turo_float (turo_t *ctx, float val)
 Outputs a formatted float result of varied precision.
 
void turo_string (turo_t *ctx, const char *str)
 Outputs a formatted string string.
 
void turo_bool (turo_t *ctx, bool val)
 Outputs a formatted boolean result.
 
void turo_dict_open (turo_t *ctx)
 Outputs a formatted open of a dictionary result.
 
void turo_dict_key (turo_t *ctx, const char *key)
 Outputs a formatted open of a dictionary result.
 
void turo_dict_close (turo_t *ctx)
 Outputs a formatted close of a dictionary result.
 
void turo_array_open (turo_t *ctx)
 Outputs a formatted open of an array result.
 
void turo_array_close (turo_t *ctx)
 Outputs a formatted close of an array result.
 
void turo_container_close (turo_t *ctx, int exit_status)
 Outputs a formatted close of a container result.
 

Typedef Documentation

◆ turo_t

typedef struct turo turo_t

Type for a TURO object.

Note
API implementers: struct turo needs to be defined by implementation-specific result_output_types.h.

Definition at line 74 of file result_output.h.

Function Documentation

◆ turo_array_close()

void turo_array_close ( turo_t ctx)

Outputs a formatted close of an array result.

Precondition
turo_container_open called
turo_array_open called
Parameters
[in]ctxThe implementation specific turo context.

◆ turo_array_open()

void turo_array_open ( turo_t ctx)

Outputs a formatted open of an array result.

A turo_array_close must match.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.

◆ turo_bool()

void turo_bool ( turo_t ctx,
bool  val 
)

Outputs a formatted boolean result.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.
[in]valThe value to output.

◆ turo_container_close()

void turo_container_close ( turo_t ctx,
int  exit_status 
)

Outputs a formatted close of a container result.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.
[in]exit_statusExit status code for the result, 0 is success.

◆ turo_container_open()

void turo_container_open ( turo_t ctx)

Outputs a container open.

Must be used when starting formatted result output.

Parameters
[in]ctxThe implementation specific turo context.

◆ turo_dict_close()

void turo_dict_close ( turo_t ctx)

Outputs a formatted close of a dictionary result.

Precondition
turo_container_open called
turo_dict_open called
Parameters
[in]ctxThe implementation specific turo context.

◆ turo_dict_key()

void turo_dict_key ( turo_t ctx,
const char *  key 
)

Outputs a formatted open of a dictionary result.

A turo value must follow.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.
[in]keyThe key of the dictionary.

◆ turo_dict_open()

void turo_dict_open ( turo_t ctx)

Outputs a formatted open of a dictionary result.

A turo_dict_close must match.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.

◆ turo_float()

void turo_float ( turo_t ctx,
float  val 
)

Outputs a formatted float result of varied precision.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.
[in]valThe value to output.

◆ turo_init()

void turo_init ( turo_t ctx)

Provides initial values for the turo context.

Parameters
[out]ctxThe implementation specific turo context.

◆ turo_s32()

void turo_s32 ( turo_t ctx,
int32_t  val 
)

Outputs a signed 32 bit integer.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.
[in]valThe value to output.

◆ turo_s64()

void turo_s64 ( turo_t ctx,
int64_t  val 
)

Outputs a signed 64 bit integer.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.
[in]valThe value to output.

◆ turo_string()

void turo_string ( turo_t ctx,
const char *  str 
)

Outputs a formatted string string.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.
[in]strThe string to output.

◆ turo_u32()

void turo_u32 ( turo_t ctx,
uint32_t  val 
)

Outputs an unsigned 32 bit integer.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.
[in]valThe value to output.

◆ turo_u64()

void turo_u64 ( turo_t ctx,
uint64_t  val 
)

Outputs a formatted result unsigned 64 bit integer.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.
[in]valThe value to output.