From: Dale Weiler Date: Sun, 27 Jan 2013 13:05:01 +0000 (+0000) Subject: Spiceing up the __VA_ARGS__ test X-Git-Tag: before-library~204 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b9fcd64a1f75d548784f23f69007b3e566f6728b;p=xonotic%2Fgmqcc.git Spiceing up the __VA_ARGS__ test --- 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")); }