|
| static void | copy (uint8_t *to, const uint8_t *from, size_t n) |
| static struct basictest_str | str (const char *s) |
| static struct basictest_entry | entry (int kind) |
| static void | flush (struct tl_state *st) |
| static int | fresh (const struct tl_state *st) |
| static int | alive (struct tl_state *st) |
| static void | out (struct tl_state *st, const uint8_t *line, size_t n, int force) |
| static size_t | emit (struct tl_state *st, struct basictest_entry *e, int force) |
| static void | broken (struct tl_state *st, const char *reason) |
| static void | simple (struct tl_state *st, int kind) |
| static void | inside (struct tl_state *st) |
| void | tl_begin (struct tl_state *st) |
| | Clears the state and writes begin.
|
| int | tl_block (struct tl_state *st, int block, const uint8_t *name, size_t length) |
| | Opens a block (block: enum basictest_block; name and length: the case name, ignored for the batch init and end).
|
| void | tl_blockend (struct tl_state *st) |
| | Closes the open block.
|
| static void | init_check (struct tl_state *st, size_t n) |
| void | tl_check (struct tl_state *st, uint32_t k, uint32_t expected, uint32_t actual) |
| | A check of two longs: ok if they are equal.
|
| void | tl_checkq (struct tl_state *st, uint32_t k, uint32_t expected, uint32_t actual) |
| | A check of two quicks (their 32 bits): ok if they are equal.
|
| void | tl_checkflt (struct tl_state *st, uint32_t k, uint32_t expected, uint32_t actual, uint32_t delta) |
| | A check of two FFP floats: ok if |actual-expected| <= delta.
|
| void | tl_checkstr (struct tl_state *st, uint32_t k, const uint8_t *expected, size_t expected_length, const uint8_t *actual, size_t actual_length) |
| | A check of two strings (bytes): ok if they are equal.
|
| int | tl_require (struct tl_state *st, uint32_t k, uint32_t condition) |
| | A precondition.
|
| void | tl_expect_error (struct tl_state *st, uint32_t k) |
| | The announcement of an expected runtime error.
|
| void | tl_finit (struct tl_state *st) |
| | The end of the run: kept entries, incomplete if a block is open, end.
|
| static void | run_clear (struct tl_run *r, struct tl_run_text *t) |
| int | tl_run_start (struct tl_state *st, uint32_t k, struct tl_run *r, struct tl_run_text *t) |
| | A program is to start (TLRunProgram): the result r and its text t cleared (rc 0, unknown, nothing printed: printed the empty string), and run K written if it may start.
|
| void | tl_run_end (struct tl_state *st, uint32_t k, struct tl_run *r, struct tl_run_text *t, int known, int32_t rc, size_t n, uint32_t size) |
| | The program ended (after tl_run_start gave 1): its output's first n bytes are in t->chars (n <= TL_RUN_TEXT), size the whole output; the result filled (printed of n bytes and a 0 behind, cut if size > n) and runend K written with rc if known, else -.
|