~brianaker/libmemcached/1164440

« back to all changes in this revision

Viewing changes to libtest/test.h

Merging bzr://gaz.tangent.org/libmemcached/build/ to Build branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
} while (0)
90
90
#define test_true_hint test_true_got
91
91
 
92
 
#define test_skip(A,B) \
93
 
do \
94
 
{ \
95
 
  if ((A) != (B)) \
 
92
#define test_skip(__expected, __actual) \
 
93
do \
 
94
{ \
 
95
  if (libtest::_compare(__FILE__, __LINE__, __func__, ((__expected)), ((__actual)), false) == false) \
 
96
  { \
 
97
    return TEST_SKIPPED; \
 
98
  } \
 
99
} while (0)
 
100
 
 
101
#define test_skip_valgrind() \
 
102
do \
 
103
{ \
 
104
  if (libtest::_in_valgrind(__FILE__, __LINE__, __func__)) \
96
105
  { \
97
106
    return TEST_SKIPPED; \
98
107
  } \
132
141
#define test_compare(__expected, __actual) \
133
142
do \
134
143
{ \
135
 
  if (not libtest::_compare(__FILE__, __LINE__, __func__, ((__expected)), ((__actual)))) \
 
144
  if (libtest::_compare(__FILE__, __LINE__, __func__, ((__expected)), ((__actual)), true) == false) \
136
145
  { \
137
146
    libtest::create_core(); \
138
147
    return TEST_FAILURE; \
166
175
#define test_compare_warn(__expected, __actual) \
167
176
do \
168
177
{ \
169
 
  void(libtest::_compare(__FILE__, __LINE__, __func__, (__expected), (__actual))); \
 
178
  void(libtest::_compare(__FILE__, __LINE__, __func__, (__expected), (__actual)), true); \
170
179
} while (0)
171
180
 
172
181
#define test_compare_warn_hint(__expected, __actual, __hint) \