Roxen.git
/
server
/
etc
/
include
/
testsuite.h
version
»
Context lines:
10
20
40
80
file
none
3
Roxen.git/server/etc/include/testsuite.h:6:
// inherit "etc/test/tests/pike_test_common.pike" // Run EXPR and check that it produces a nonzero result. If the test // is logged then EXPR is printed. If ARGS is given then // sprintf(EXPR, ARGS) is printed. Returns the result of EXPR. #define TEST_TRUE(EXPR, ARGS...) \ cpp_test_true (__FILE__, __LINE__, \ lambda() {return (EXPR);}, \ #EXPR, ({ARGS}))
+
#define TEST_FALSE(EXPR, ARGS...) \
+
cpp_test_true (__FILE__, __LINE__, \
+
lambda() {return !(EXPR);}, \
+
#EXPR, ({ARGS}))
+
#define TEST_EQUAL(A, B) \ do { \ int len__ = min (max (sizeof (#A), sizeof (#B)), 40); \ array args__ = ({len__, #A, 0, len__, #B, 0}); \ cpp_test_true (__FILE__, __LINE__, \ lambda() { \ return equal (args__[2] = (A), args__[5] = (B)); \ }, \ "%-*s (is %O) equals\n" \ "%-*s (is %O)?", \