From ab4e5956701888a8c2e74fb5d15c7d3186f5534d Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Tue, 27 Jun 2023 19:07:27 +0100 Subject: [PATCH] Add failuref() test function that allows the use of format strings --- common/test-core/test-stuff.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/test-core/test-stuff.h b/common/test-core/test-stuff.h index 6c51e136f1..c14cf6fed1 100644 --- a/common/test-core/test-stuff.h +++ b/common/test-core/test-stuff.h @@ -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.