mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
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>
19 lines
333 B
C
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
|