mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-02 01:41:04 -05:00
tests: Add Unit tests for wl_map and wl_array data structures
We use a simple test-runner helper that runs each test in a separate process and reports the pass/fail rate at the end.
This commit is contained in:
parent
214e343311
commit
62d2569954
6 changed files with 281 additions and 1 deletions
14
tests/test-runner.h
Normal file
14
tests/test-runner.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
struct test {
|
||||
const char *name;
|
||||
void (*run)(void);
|
||||
};
|
||||
|
||||
#define TEST(name) \
|
||||
static void name(void); \
|
||||
\
|
||||
const struct test test##name \
|
||||
__attribute__ ((section ("test_section"))) = { \
|
||||
#name, name \
|
||||
}; \
|
||||
\
|
||||
static void name(void)
|
||||
Loading…
Add table
Add a link
Reference in a new issue