From 81a4197fb79ce651cb6f8cfe5adbef0422ef1bea Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Thu, 29 Nov 2018 10:01:12 +0100 Subject: [PATCH] add test --- tests/parser/cpp004.phpt | 23 +++++++++++++++++++++++ tests/parser/cpp004/builtins.psi | 10 ++++++++++ 2 files changed, 33 insertions(+) create mode 100644 tests/parser/cpp004.phpt create mode 100644 tests/parser/cpp004/builtins.psi diff --git a/tests/parser/cpp004.phpt b/tests/parser/cpp004.phpt new file mode 100644 index 0000000..2278e23 --- /dev/null +++ b/tests/parser/cpp004.phpt @@ -0,0 +1,23 @@ +--TEST-- +CPP argument prescan +--SKIPIF-- + +--INI-- +psi.directory={PWD}/cpp004 +--FILE-- +===TEST=== + +===DONE=== +--EXPECT-- +===TEST=== +int(0) +int(1) +int(2) +int(3003) +int(4004) +int(5005) +===DONE=== diff --git a/tests/parser/cpp004/builtins.psi b/tests/parser/cpp004/builtins.psi new file mode 100644 index 0000000..d6cbf38 --- /dev/null +++ b/tests/parser/cpp004/builtins.psi @@ -0,0 +1,10 @@ +const \CPP_TEST0 = __COUNTER__; +const \CPP_TEST1 = __COUNTER__; +const \CPP_TEST2 = __COUNTER__; + +#define a(x,y) x ## y +#define b(x,y) a(x,y) +#define c(x) b(x, __COUNTER__) +const \CPP_TEST3 = c(300); +const \CPP_TEST4 = c(400); +const \CPP_TEST5 = c(500); -- 2.30.2