blob: 72234df5fd570d946ed520f11b97a9fdfe82ce1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include <stdarg.h>
#include <stdbool.h>
#include "debug.h"
#define todo_wine if(0)
#define ok(cond, desc, ...) _ok(cond, #cond, desc, ## __VA_ARGS__ )
static inline void _ok(bool cond, const char *cond_str, const char *str, ...)
{
va_list ap;
va_start(ap, str);
if (!cond) {
printf("FAIL: %s\n ", cond_str);
vprintf(str, ap);
} else {
printf("ok: %s\n", cond_str);
}
va_end(ap);
}
|