Correct style, use of newer YATL.
[awesomized/libmemcached] / libtest / result.hpp
index a55926403c111a7e80e244e3a4b104becc924914..0c78b9980f5469eb2a31ac235b796c36237fe180 100644 (file)
@@ -57,10 +57,26 @@ do \
   throw libtest::__failure(LIBYATL_DEFAULT_PARAM, __VA_ARGS__); \
 } while (0)
 
-#define fatal_message(...) \
+#define FATAL(...) \
 do \
 { \
   throw libtest::fatal(LIBYATL_DEFAULT_PARAM, __VA_ARGS__); \
 } while (0)
 
+#define FATAL_IF(__expression, ...) \
+do \
+{ \
+  if ((__expression)) { \
+    throw libtest::fatal(LIBYATL_DEFAULT_PARAM, (#__expression)); \
+  } \
+} while (0)
+
+#define FATAL_IF_(__expression, ...) \
+do \
+{ \
+  if ((__expression)) { \
+    throw libtest::fatal(LIBYATL_DEFAULT_PARAM, __VA_ARGS__); \
+  } \
+} while (0)
+
 #define fatal_assert(__assert) if((__assert)) {} else { throw libtest::fatal(LIBYATL_DEFAULT_PARAM, #__assert); }