From b9fcd64a1f75d548784f23f69007b3e566f6728b Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sun, 27 Jan 2013 13:05:01 +0000 Subject: [PATCH] Spiceing up the __VA_ARGS__ test --- tests/pp_va_args.qc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/pp_va_args.qc b/tests/pp_va_args.qc index 6e4002c..89a98c8 100644 --- a/tests/pp_va_args.qc +++ b/tests/pp_va_args.qc @@ -13,9 +13,12 @@ void print(...) = #1; // method 3 #define METHOD_3(F,...) F __VA_ARGS__ +// selector +#define METHOD(I, F, ...) METHOD_##I (F, __VA_ARGS__) + void main() { - METHOD_0(print, ("Method", " \n")); - METHOD_1(print, ("Method", " \n")); - METHOD_2(print, ("Method", " \n")); - METHOD_3(print, ("Method", " \n")); + METHOD(0, print, ("Method", " \n")); + METHOD(1, print, ("Method", " \n")); + METHOD(2, print, ("Method", " \n")); + METHOD(3, print, ("Method", " \n")); }