1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2024-11-11 13:51:02 -05:00

Add stub run_tests

For when unit testing is disabled
This commit is contained in:
Yuxuan Shui 2019-03-13 21:08:01 +00:00
parent d0afc3eeb3
commit 115d38f7b6

5
test.h
View file

@ -75,7 +75,7 @@ struct test_file_metadata __attribute__((weak)) * test_file_head;
struct test_file_metadata *file_metadata)
/// Run defined tests, return true if all tests succeeds
static inline bool run_tests(void) {
static inline bool __attribute__((unused)) run_tests(void) {
struct test_file_metadata *i = test_file_head;
int failed = 0, success = 0;
while (i) {
@ -111,4 +111,7 @@ static inline bool run_tests(void) {
#define TEST_EQUAL(a, b)
#define TEST_TRUE(a)
static inline bool __attribute__((unused)) run_tests(void) {
return true;
}
#endif