aboutsummaryrefslogtreecommitdiff
path: root/include/test/__meta__.h
blob: 05a202f21aef13f1b65321447ea0f33ca52553b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef INC_TEST___META___H
#define INC_TEST___META___H

#include <lib/bool.h>
#include <stdio.h>

#define _TEST_PASS(s,n) fprintf(stderr, "%s/%02X: \x1b[92mPASS\x1b[0m\n", s, ++n)
#define _TEST_FAIL(s,n) fprintf(stderr, "%s/%02X: \x1b[91mFAIL\x1b[0m\n", s, ++n)

#ifndef _TEST_RESULT
#define _TEST_RESULT(docstring,result,n,n_success) if (!result) {_TEST_FAIL(docstring, n);} else {_TEST_PASS(docstring,n);n_success++;}
#endif

#endif