summaryrefslogtreecommitdiff
path: root/yapf/unittest/unittest.h
blob: f448ea3419bcc1e000ec25e424e4cda494bd9081 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* $Id$ */

#define UNITTEST

extern int num_tests_failed;
extern int num_tests_total;

extern bool _dbg;
#define DBG if(_dbg) printf


#define CHECK_INT(case_num, val, should_be) \
{ \
	if((val) != (should_be)) { \
	res |= (1 << case_num); \
	printf("\n****** ERROR in case %d: " #val " = %d (should be %d)!", case_num, (val), (should_be)); \
	} \
}

typedef int(*TESTPROC)(bool silent);

//#undef FORCEINLINE
//#define FORCEINLINE


#if defined(_WIN32) || defined(_WIN64)
#  include <windows.h>
#else
#endif