xserver/test/tests-common.h
Peter Hutterer 46b579e8d5 test: switch the unit tests to something resembling a test suite
The tests have inadvertent dependencies on each other so let's avoid
those by changing to a system that returns a null-terminated list of
test functions and our test runner iterates over those and forks off one
process per function.
2024-01-30 00:15:10 +00:00

13 lines
286 B
C

#ifndef TESTS_COMMON_H
#define TESTS_COMMON_H
#include "tests.h"
#define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0]))
#define run_test(func) run_test_in_child(func, #func)
void run_test_in_child(const testfunc_t* (*func)(void), const char *funcname);
#endif /* TESTS_COMMON_H */