add indentation to protocol.txt for readability
[beanstalkd.git] / ct / ct.h
blobb645fe44dcbee3ba97c9a97564a6ddef8c225306
1 char *ctdir(void);
2 void ctfail(void);
3 void ctfailnow(void);
4 void ctresettimer(void);
5 void ctstarttimer(void);
6 void ctstoptimer(void);
7 void ctsetbytes(int);
8 void ctlogpn(const char*, int, const char*, ...) __attribute__((format(printf, 3, 4)));
9 #define ctlog(...) ctlogpn(__FILE__, __LINE__, __VA_ARGS__)
10 #define assert(x) do if (!(x)) {\
11 ctlog("%s", "test: " #x);\
12 ctfailnow();\
13 } while (0)
14 #define assertf(x, ...) do if (!(x)) {\
15 ctlog("%s", "test: " #x);\
16 ctlog(__VA_ARGS__);\
17 ctfailnow();\
18 } while (0)