check: unbreak fail #define
authorSjoerd Simons <sjoerd@luon.net>
Sat, 28 Jul 2012 15:33:52 +0000 (17:33 +0200)
committerTim-Philipp Müller <tim@centricular.net>
Mon, 30 Jul 2012 15:20:02 +0000 (16:20 +0100)
The fail() definition was changed to not fail with non-GCC compilers,
unfortunately the change was incorrect and appended the first argument
of fail to the expression string instead of making it the message.

This change does mean that fail() now requires a message to be passed
along.

https://bugzilla.gnome.org/show_bug.cgi?id=680755

libs/gst/check/libcheck/check.h.in

index 3ed1acd..b0edb41 100644 (file)
@@ -232,7 +232,7 @@ static void __testname (int _i CK_ATTRIBUTE_UNUSED)\
         "Failure '"#expr"' occured" , ## __VA_ARGS__, NULL)
 
 /* Always fail */
-#define fail(...) _fail_unless(0, __FILE__, __LINE__, "Failed"  __VA_ARGS__, NULL)
+#define fail(...) _fail_unless(0, __FILE__, __LINE__, "Failed", __VA_ARGS__, NULL)
 
 /* Non macro version of #fail_unless, with more complicated interface */
 void CK_EXPORT _fail_unless (int result, const char *file,