summaryrefslogtreecommitdiff
path: root/src/init/tests/main.h
blob: 97678e34202fe85380e22df391913fb0f647abdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#pragma once

void test_all(void);
void test_pipe(void);

#ifdef TEST_MACROS

#define argify(str) str, sizeof(str) - 1
#define test_fail() do { \
	printf("\033[31m" "TEST FAILED: %s:%xh\n" "\033[0m", __func__, __LINE__); \
	return; \
} while (0)
#define assert(cond) if (!(cond)) test_fail();

#endif