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:
Kristian Høgsberg 2012-03-02 18:03:16 -05:00
parent 214e343311
commit 62d2569954
6 changed files with 281 additions and 1 deletions

14
tests/test-runner.h Normal file
View 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)