@@ -140,6 +140,16 @@ spl_assert(const char *buf, const char *file, const char *func, int line)
140
140
(long long) (_verify3_right)); \
141
141
} while (0)
142
142
143
+ #define VERIFY_IMPLY (A , B ) \
144
+ ((void)(likely((!(A)) || (B)) || \
145
+ spl_assert("(" #A ") implies (" #B ")", \
146
+ __FILE__, __FUNCTION__, __LINE__)))
147
+
148
+ #define VERIFY_EQUIV (A , B ) \
149
+ ((void)(likely(!!(A) == !!(B)) || \
150
+ spl_assert("(" #A ") is equivalent to (" #B ")", \
151
+ __FILE__, __FUNCTION__, __LINE__)))
152
+
143
153
/*
144
154
* Debugging disabled (--disable-debug)
145
155
*/
@@ -171,14 +181,8 @@ spl_assert(const char *buf, const char *file, const char *func, int line)
171
181
#define ASSERT3P VERIFY3P
172
182
#define ASSERT0 VERIFY0
173
183
#define ASSERT VERIFY
174
- #define IMPLY (A , B ) \
175
- ((void)(likely((!(A)) || (B)) || \
176
- spl_assert("(" #A ") implies (" #B ")", \
177
- __FILE__, __FUNCTION__, __LINE__)))
178
- #define EQUIV (A , B ) \
179
- ((void)(likely(!!(A) == !!(B)) || \
180
- spl_assert("(" #A ") is equivalent to (" #B ")", \
181
- __FILE__, __FUNCTION__, __LINE__)))
184
+ #define IMPLY VERIFY_IMPLY
185
+ #define EQUIV VERIFY_EQUIV
182
186
183
187
#endif /* NDEBUG */
184
188
0 commit comments