result_output.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 HAW Hamburg
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
50 #ifndef TEST_UTILS_RESULT_OUTPUT_H
51 #define TEST_UTILS_RESULT_OUTPUT_H
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 #include <stdint.h>
58 #include <stdbool.h>
59 #include <stddef.h>
60 
61 #include "result_output_types.h"
62 
74 typedef struct turo turo_t;
75 
81 void turo_init(turo_t *ctx);
82 
91 
100 void turo_s32(turo_t *ctx, int32_t val);
101 
110 void turo_u32(turo_t *ctx, uint32_t val);
111 
120 void turo_s64(turo_t *ctx, int64_t val);
121 
130 void turo_u64(turo_t *ctx, uint64_t val);
131 
140 void turo_float(turo_t *ctx, float val);
141 
150 void turo_string(turo_t *ctx, const char *str);
151 
160 void turo_bool(turo_t *ctx, bool val);
161 
172 
183 void turo_dict_key(turo_t *ctx, const char *key);
184 
194 
205 
215 
224 void turo_container_close(turo_t *ctx, int exit_status);
241 void turo_array_u8(turo_t *ctx, uint8_t *vals, size_t size);
242 
252 void turo_array_s32(turo_t *ctx, int32_t *vals, size_t size);
253 
263 void turo_dict_string(turo_t *ctx, const char *key, const char *val);
264 
274 void turo_dict_s32(turo_t *ctx, const char *key, int32_t val);
275 
286 void turo_simple_s32(turo_t *ctx, int32_t val);
287 
299 void turo_simple_array_u8(turo_t *ctx, uint8_t *vals, size_t size);
300 
312 void turo_simple_array_s32(turo_t *ctx, int32_t *vals, size_t size);
313 
325 void turo_simple_dict_string(turo_t *ctx, const char *key, const char *val);
326 
338 void turo_simple_dict_s32(turo_t *ctx, const char *key, int32_t val);
339 
350 void turo_simple_exit_status(turo_t *ctx, int exit_status);
353 #ifdef __cplusplus
354 }
355 #endif
356 #endif /* TEST_UTILS_RESULT_OUTPUT_H */
void turo_string(turo_t *ctx, const char *str)
Outputs a formatted string string.
void turo_array_close(turo_t *ctx)
Outputs a formatted close of an array result.
void turo_float(turo_t *ctx, float val)
Outputs a formatted float result of varied precision.
void turo_bool(turo_t *ctx, bool val)
Outputs a formatted boolean result.
void turo_s64(turo_t *ctx, int64_t val)
Outputs a signed 64 bit integer.
void turo_array_open(turo_t *ctx)
Outputs a formatted open of an array result.
void turo_container_open(turo_t *ctx)
Outputs a container open.
void turo_container_close(turo_t *ctx, int exit_status)
Outputs a formatted close of a container result.
void turo_s32(turo_t *ctx, int32_t val)
Outputs a signed 32 bit integer.
void turo_dict_key(turo_t *ctx, const char *key)
Outputs a formatted open of a dictionary result.
void turo_dict_open(turo_t *ctx)
Outputs a formatted open of a dictionary result.
void turo_init(turo_t *ctx)
Provides initial values for the turo context.
void turo_u32(turo_t *ctx, uint32_t val)
Outputs an unsigned 32 bit integer.
void turo_dict_close(turo_t *ctx)
Outputs a formatted close of a dictionary result.
void turo_u64(turo_t *ctx, uint64_t val)
Outputs a formatted result unsigned 64 bit integer.
void turo_array_s32(turo_t *ctx, int32_t *vals, size_t size)
Outputs a int32 array result.
void turo_array_u8(turo_t *ctx, uint8_t *vals, size_t size)
Outputs a formatted uint8 array result.
void turo_simple_s32(turo_t *ctx, int32_t val)
Outputs a full successful int32 turo result.
void turo_simple_exit_status(turo_t *ctx, int exit_status)
Outputs a full turo result with exit code.
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_dict_string(turo_t *ctx, const char *key, const char *val)
Outputs a dict with string data.
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_array_s32(turo_t *ctx, int32_t *vals, size_t size)
Outputs a full successful int32 array 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_dict_s32(turo_t *ctx, const char *key, int32_t val)
Outputs a dict with integer data.
turo type