Moved logging macros to base.h and use them everywhere
The macros used in the testing library are actually useful everywhere so may as well use them.
This commit is contained in:
@@ -24,16 +24,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define MESSAGE(FILE, COLOUR, NAME, FORMAT, ...) \
|
||||
fprintf(FILE, "\t[" COLOUR "%s" TERM_RESET "]: " FORMAT, NAME, __VA_ARGS__)
|
||||
|
||||
#define INFO(NAME, FORMAT, ...) \
|
||||
MESSAGE(stdout, TERM_YELLOW, NAME, FORMAT, __VA_ARGS__)
|
||||
#define FAIL(NAME, FORMAT, ...) \
|
||||
MESSAGE(stderr, TERM_RED, NAME, FORMAT, __VA_ARGS__)
|
||||
#define SUCCESS(NAME, FORMAT, ...) \
|
||||
MESSAGE(stdout, TERM_GREEN, NAME, FORMAT, __VA_ARGS__)
|
||||
|
||||
typedef void (*test_fn)(void);
|
||||
struct Test
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user