summaryrefslogtreecommitdiff
path: root/yapf/unittest/unittest.h
diff options
context:
space:
mode:
authorKUDr <kudr@openttd.org>2006-05-27 16:12:16 +0000
committerKUDr <kudr@openttd.org>2006-05-27 16:12:16 +0000
commit5e73dce0e71791b87e5b096a890578eefcc26639 (patch)
treee4580db6e03032a997fce1392929b7190dc3b03d /yapf/unittest/unittest.h
parent3d01010440440cfbffd1e5d3b0cf1f23f0503a76 (diff)
downloadopenttd-5e73dce0e71791b87e5b096a890578eefcc26639.tar.xz
(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous support and users for testing.
Diffstat (limited to 'yapf/unittest/unittest.h')
-rw-r--r--yapf/unittest/unittest.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/yapf/unittest/unittest.h b/yapf/unittest/unittest.h
new file mode 100644
index 000000000..27ba4ebdd
--- /dev/null
+++ b/yapf/unittest/unittest.h
@@ -0,0 +1,34 @@
+/* $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
+
+
+
+
+