Branch: Tag:

2011-04-18

2011-04-18 14:57:26 by Martin Stjernholm <mast@lysator.liu.se>

Kludge to reduce local variable consumption.

Pike really needs a better stack allocator. :(

Rev: server/etc/include/testsuite.h:1.5

19:    #EXPR, ({ARGS}))      #define TEST_EQUAL(A, B) \ -  do { \ +  lambda () { \    int len__ = min (max (sizeof (#A), sizeof (#B)), 40); \    array args__ = ({len__, #A, 0, len__, #B, 0}); \    cpp_test_true (__FILE__, __LINE__, \
30:    "%-*s (is %O)?", \    args__); \    args__ = 0; \ -  } while (0) +  }()      #define TEST_NOT_EQUAL(A, B) \ -  do { \ +  lambda () { \    int len__ = min (max (sizeof (#A), sizeof (#B)), 40); \    array args__ = ({len__, #A, 0, len__, #B, 0}); \    cpp_test_true (__FILE__, __LINE__, \
44:    "%-*s (is %O)?", \    args__); \    args__ = 0; \ -  } while (0) +  }()      #define TEST_CMP(A, OP, B) \ -  do { \ +  lambda () { \    int len__ = min (max (sizeof (#A), sizeof (#B)), 40); \    array args__ = ({len__, #A, 0, len__, #B, 0}); \    cpp_test_true (__FILE__, __LINE__, \
58:    "%-*s (is %O)?", \    args__); \    args__ = 0; \ -  } while (0) +  }()      #define TEST_ERROR(CODE, ARGS...) \    cpp_test_true (__FILE__, __LINE__, \