rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions | Variables
test.c File Reference

Detailed Description

Tests support code.

Definition in file test.c.

Functions

void test_printn (uint32_t n)
 Prints a decimal unsigned number.
 
void test_print (const char *msgp)
 Prints a line without final end-of-line.
 
void test_println (const char *msgp)
 Prints a line.
 
static void clear_tokens (void)
 
static void print_tokens (void)
 
void test_emit_token (char token)
 Emits a token into the tokens buffer.
 
bool _test_fail (unsigned point)
 
bool _test_assert (unsigned point, bool condition)
 
bool _test_assert_sequence (unsigned point, char *expected)
 
bool _test_assert_time_window (unsigned point, systime_t start, systime_t end)
 
void test_terminate_threads (void)
 Sets a termination request in all the test-spawned threads.
 
void test_wait_threads (void)
 Waits for the completion of all the test-spawned threads.
 
void test_cpu_pulse (unsigned duration)
 CPU pulse.
 
systime_t test_wait_tick (void)
 Delays execution until next system time tick.
 
static void tmr (void *p)
 
void test_start_timer (unsigned ms)
 Starts the test timer.
 
static void execute_test (const struct testcase *tcp)
 
static void print_line (void)
 
msg_t TestThread (void *p)
 Test execution thread function.
 

Variables

static ROMCONST struct testcase *ROMCONST * patterns []
 
static bool local_fail
 
static bool global_fail
 
static unsigned failpoint
 
static char tokens_buffer [MAX_TOKENS]
 
static chartokp
 
union test_buffers test
 
thread_t * threads [MAX_THREADS]
 
void *ROMCONST wa [5]
 
static BaseSequentialStream * chp
 
bool test_timer_done
 Set to TRUE when the test timer reaches its deadline.
 
static VirtualTimer vt
 

Go to the source code of this file.