diff options
Diffstat (limited to 'tests/test_macro_operators.sh')
| -rw-r--r-- | tests/test_macro_operators.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_macro_operators.sh b/tests/test_macro_operators.sh index daf8f47..a77d3ca 100644 --- a/tests/test_macro_operators.sh +++ b/tests/test_macro_operators.sh @@ -41,3 +41,19 @@ int main() { } EOF +cat <<'EOF' > expected +123 +EOF +test_diff <<'EOF' +int printf(const char*, ...); + +#define F(x) CHECK(G(x)) +#define G(x) CHECK(H(x)) +#define CHECK(x) x + +int H(int n) { return n; } + +int main() { + printf("%d\n", F(123)); +} +EOF |
