check: unbreak fail #define

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
This commit is contained in:
Sjoerd Simons 2012-07-28 17:33:52 +02:00 committed by Tim-Philipp Müller
parent d89219eba3
commit 8d9a4b2e94

View 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,