|
BB2 C port
API reference: Blitz libraries in C and the shared code
|
#include "basictest.h"Data Structures | |
| struct | field |
| struct | text |
Macros | |
| #define | MAXFIELDS 10 |
Functions | |
| static int | is (const struct field *f, const char *s) |
| static int | hexval (uint8_t c) |
| static int | decimal (const uint8_t *s, size_t n, uint32_t *v) |
| static int | longval (const struct field *f, uint32_t *v) |
| static int | strval (uint8_t *s, size_t n, struct basictest_str *v) |
| static unsigned | string_value (struct field *f, struct basictest_str *v, uint32_t *length, uint32_t *crc, int *cut) |
| static int | string_values (struct field *f, struct basictest_entry *e) |
| static int | fail (struct basictest_error *err, int code, unsigned field) |
| int | basictest_read (uint8_t *line, size_t length, uint32_t line_number, struct basictest_entry *e, struct basictest_error *err) |
| Reads one line of the result file (without its LF) into e. | |
| static void | tput (struct text *t, char c) |
| static void | tputs (struct text *t, const char *s) |
| static void | tdecimal (struct text *t, uint32_t v) |
| size_t | basictest_error_text (const struct basictest_error *err, char *buf, size_t size) |
| Writes the text of a reader error ("line 3: check: malformed
value in field 5"), 0-terminated, cut to fit size bytes (size > 0). The entry name is written as a string value. | |
Variables | |
| struct { | |
| const char * name | |
| int kind | |
| unsigned fields | |
| } | kinds [] |
| #define MAXFIELDS 10 |
| size_t basictest_error_text | ( | const struct basictest_error * | err, |
| char * | buf, | ||
| size_t | size ) |
Writes the text of a reader error ("line 3: check: malformed value in field 5"), 0-terminated, cut to fit size bytes (size > 0). The entry name is written as a string value.
| int basictest_read | ( | uint8_t * | line, |
| size_t | length, | ||
| uint32_t | line_number, | ||
| struct basictest_entry * | e, | ||
| struct basictest_error * | err ) |
Reads one line of the result file (without its LF) into e.
The string values are decoded in place: e's strings point into line, which the call changes. line_number is the number of the line in the file, for the error.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| unsigned fields |
| int kind |
| const struct { ... } kinds[] |
| const char* name |