You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
588 B
26 lines
588 B
13 years ago
|
#ifndef _TEST_RUNNER_H_
|
||
|
#define _TEST_RUNNER_H_
|
||
|
|
||
|
#ifdef NDEBUG
|
||
|
#error "Tests must not be built with NDEBUG defined, they rely on assert()."
|
||
|
#endif
|
||
|
|
||
|
#include "../src/compositor.h"
|
||
|
|
||
|
struct test {
|
||
|
const char *name;
|
||
|
void (*run)(struct weston_compositor *compositor);
|
||
|
} __attribute__ ((aligned (16)));
|
||
|
|
||
|
#define TEST(name) \
|
||
|
static void name(struct weston_compositor *compositor); \
|
||
|
\
|
||
|
const struct test test##name \
|
||
|
__attribute__ ((section ("test_section"))) = { \
|
||
|
#name, name \
|
||
|
}; \
|
||
|
\
|
||
|
static void name(struct weston_compositor *compositor)
|
||
|
|
||
|
#endif
|