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