Loading...
Searching...
No Matches
Test Utils Result Output Helpers

Common functions and helpers that all implementations can use. More...

Detailed Description

Common functions and helpers that all implementations can use.

Functions

void turo_array_u8 (turo_t *ctx, uint8_t *vals, size_t size)
 Outputs a formatted uint8 array result.
 
void turo_array_s32 (turo_t *ctx, int32_t *vals, size_t size)
 Outputs a int32 array result.
 
void turo_dict_string (turo_t *ctx, const char *key, const char *val)
 Outputs a dict with string data.
 
void turo_dict_s32 (turo_t *ctx, const char *key, int32_t val)
 Outputs a dict with integer data.
 
void turo_simple_s32 (turo_t *ctx, int32_t val)
 Outputs a full successful int32 turo result.
 
void turo_simple_array_u8 (turo_t *ctx, uint8_t *vals, size_t size)
 Outputs a full successful uint8 array turo result.
 
void turo_simple_array_s32 (turo_t *ctx, int32_t *vals, size_t size)
 Outputs a full successful int32 array turo result.
 
void turo_simple_dict_string (turo_t *ctx, const char *key, const char *val)
 Outputs a full successful dict with string turo result.
 
void turo_simple_dict_s32 (turo_t *ctx, const char *key, int32_t val)
 Outputs a full successful dict with an integer turo result.
 
void turo_simple_exit_status (turo_t *ctx, int exit_status)
 Outputs a full turo result with exit code.
 

Function Documentation

◆ turo_array_s32()

void turo_array_s32 ( turo_t ctx,
int32_t *  vals,
size_t  size 
)

Outputs a int32 array result.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.
[in]valsA buffer of data to output.
[in]sizeThe amount of elements to output.

◆ turo_array_u8()

void turo_array_u8 ( turo_t ctx,
uint8_t *  vals,
size_t  size 
)

Outputs a formatted uint8 array result.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.
[in]valsA buffer of data to output.
[in]sizeThe amount of elements to output.

◆ turo_dict_s32()

void turo_dict_s32 ( turo_t ctx,
const char *  key,
int32_t  val 
)

Outputs a dict with integer data.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.
[in]keyA dictionary key.
[in]valThe integer value of the dictionary.

◆ turo_dict_string()

void turo_dict_string ( turo_t ctx,
const char *  key,
const char *  val 
)

Outputs a dict with string data.

Precondition
turo_container_open called
Parameters
[in]ctxThe implementation specific turo context.
[in]keyA dictionary key.
[in]valA string value of the dictionary

◆ turo_simple_array_s32()

void turo_simple_array_s32 ( turo_t ctx,
int32_t *  vals,
size_t  size 
)

Outputs a full successful int32 array turo result.

This includes all opening and closing of turo elements.

Precondition
turo ctx initialized
Parameters
[in]ctxThe implementation specific turo context.
[in]valsThe buffer of the integers.
[in]sizeNumber of elements in the array.

◆ turo_simple_array_u8()

void turo_simple_array_u8 ( turo_t ctx,
uint8_t *  vals,
size_t  size 
)

Outputs a full successful uint8 array turo result.

This includes all opening and closing of turo elements.

Precondition
turo ctx initialized
Parameters
[in]ctxThe implementation specific turo context.
[in]valsThe buffer of the integers.
[in]sizeNumber of elements in the array.

◆ turo_simple_dict_s32()

void turo_simple_dict_s32 ( turo_t ctx,
const char *  key,
int32_t  val 
)

Outputs a full successful dict with an integer turo result.

This includes all opening and closing of turo elements.

Precondition
turo ctx initialized
Parameters
[in]ctxThe implementation specific turo context.
[in]keyThe dictionary key.
[in]valThe integer value.

◆ turo_simple_dict_string()

void turo_simple_dict_string ( turo_t ctx,
const char *  key,
const char *  val 
)

Outputs a full successful dict with string turo result.

This includes all opening and closing of turo elements.

Precondition
turo ctx initialized
Parameters
[in]ctxThe implementation specific turo context.
[in]keyThe dictionary key.
[in]valThe string value.

◆ turo_simple_exit_status()

void turo_simple_exit_status ( turo_t ctx,
int  exit_status 
)

Outputs a full turo result with exit code.

This includes all opening and closing of turo elements.

Precondition
turo ctx initialized
Parameters
[in]ctxThe implementation specific turo context.
[in]exit_statusThe exit status to output.

◆ turo_simple_s32()

void turo_simple_s32 ( turo_t ctx,
int32_t  val 
)

Outputs a full successful int32 turo result.

This includes all opening and closing of turo elements.

Precondition
turo ctx initialized
Parameters
[in]ctxThe implementation specific turo context.
[in]valThe value to output.