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.
This commit is contained in:
Peter Hutterer
2024-01-05 11:26:26 +10:00
parent 133e0d651c
commit 46b579e8d5
26 changed files with 338 additions and 252 deletions

View File

@@ -223,13 +223,17 @@ bswap_test(void)
assert(result_64 == expect_64);
}
int
const testfunc_t*
misc_test(void)
{
dix_version_compare();
dix_update_desktop_dimensions();
dix_request_size_checks();
bswap_test();
static const testfunc_t testfuncs[] = {
dix_version_compare,
dix_update_desktop_dimensions,
dix_request_size_checks,
bswap_test,
NULL,
};
return testfuncs;
return 0;
}