diff options
| author | Kristian Høgsberg <krh@bitplanet.net> | 2012-03-02 18:03:16 -0500 |
|---|---|---|
| committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-03-02 18:05:33 -0500 |
| commit | 62d25699540a71aa42f6414cd51cedfb8d3a3392 (patch) | |
| tree | e80d80afbb73656c4f598366f5424eb556167eee /tests/test-runner.h | |
| parent | Terminate drag if data source is destroyed (diff) | |
| download | wayland-62d25699540a71aa42f6414cd51cedfb8d3a3392.tar wayland-62d25699540a71aa42f6414cd51cedfb8d3a3392.tar.gz wayland-62d25699540a71aa42f6414cd51cedfb8d3a3392.tar.bz2 wayland-62d25699540a71aa42f6414cd51cedfb8d3a3392.tar.lz wayland-62d25699540a71aa42f6414cd51cedfb8d3a3392.tar.xz wayland-62d25699540a71aa42f6414cd51cedfb8d3a3392.tar.zst wayland-62d25699540a71aa42f6414cd51cedfb8d3a3392.zip | |
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.
Diffstat (limited to 'tests/test-runner.h')
| -rw-r--r-- | tests/test-runner.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test-runner.h b/tests/test-runner.h new file mode 100644 index 0000000..c1fdff9 --- /dev/null +++ b/tests/test-runner.h @@ -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) |
