Add failuref() test function that allows the use of format strings

This commit is contained in:
Simon Arlott 2023-06-27 19:07:27 +01:00
parent aba64c9762
commit ab4e595670
No known key found for this signature in database
GPG Key ID: DF001BFD83E75990

View File

@ -133,6 +133,8 @@ void failure_args(
#define do_test( result, title ) do_test_call( result, title, __FILE__, __LINE__ )
#define success( title ) success_call( title, __FILE__, __LINE__ );
#define failure( title ) failure_call( title, __FILE__, __LINE__ );
#define failuref( title, format, ... ) failure_args( title, __FILE__, __LINE__, format, ## __VA_ARGS__ );
/** This one doesn't work because macros can't take a variable number of arguments.
* well, apparently gcc can, but it's non-standard.