wayland/tests/test-runner.h
U. Artie Eoff a0e590a0f3 Add simple memory leak check to all tests.
Wrap all tests with a memory balance check to detect potential
memory leaks.
Fixed a few tests that had memory leaks contained in the tests
themselves.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-03-24 14:37:42 -04:00

19 lines
333 B
C

#ifndef _TEST_RUNNER_H_
#define _TEST_RUNNER_H_
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)
#endif