From 51bccd8753fc1abf732fbe2a80972480d06f2d8a Mon Sep 17 00:00:00 2001 From: Snaipe Date: Mon, 16 Mar 2015 15:30:13 +0100 Subject: [PATCH] Made Test -pedantic compliant --- include/criterion/criterion.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/criterion/criterion.h b/include/criterion/criterion.h index 6c59180..2c0d963 100644 --- a/include/criterion/criterion.h +++ b/include/criterion/criterion.h @@ -30,6 +30,7 @@ # include "assert.h" struct criterion_test_extra_data { + int sentinel_; const char *const file_; const unsigned line_; void (*init)(void); @@ -56,7 +57,8 @@ struct criterion_test_set { # define TEST_PROTOTYPE_(Category, Name) \ void IDENTIFIER_(Category, Name, impl)(void) -# define Test(Category, Name, ...) \ +# define Test(...) Test_(__VA_ARGS__, .sentinel_ = 0) +# define Test_(Category, Name, ...) \ TEST_PROTOTYPE_(Category, Name); \ struct criterion_test_extra_data IDENTIFIER_(Category, Name, extra) = { \ .file_ = __FILE__, \