Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes #293
- Loading branch information
Showing
3 changed files
with
60 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
char *ctdir(void); | ||
void ctfail(void); | ||
void ctfailnow(void); | ||
void ctresettimer(void); | ||
void ctstarttimer(void); | ||
void ctstoptimer(void); | ||
void ctsetbytes(int); | ||
void ctlogpn(char*, int, char*, ...) __attribute__((format(printf, 3, 4))); | ||
void ctlogpn(const char*, int, const char*, ...) __attribute__((format(printf, 3, 4))); | ||
#define ctlog(...) ctlogpn(__FILE__, __LINE__, __VA_ARGS__) | ||
#define assert(x) do if (!(x)) {\ | ||
ctlog("%s", "test: " #x);\ | ||
ctfail();\ | ||
ctfailnow();\ | ||
} while (0) | ||
#define assertf(x, ...) do if (!(x)) {\ | ||
ctlog("%s", "test: " #x);\ | ||
ctlog(__VA_ARGS__);\ | ||
ctfail();\ | ||
ctfailnow();\ | ||
} while (0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters