From 339012c8298adb4f5f2308821163143035d7b870 Mon Sep 17 00:00:00 2001 From: chrchr-github <78114321+chrchr-github@users.noreply.github.com> Date: Tue, 22 Oct 2024 12:11:23 +0200 Subject: [PATCH] Update test.cpp --- test.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test.cpp b/test.cpp index 5b88978..8ae2fa2 100644 --- a/test.cpp +++ b/test.cpp @@ -731,6 +731,13 @@ static void define_define_11a() "#define TEST_MACRO CONCAT(A, B, C)\n" "TEST_MACRO\n"; ASSERT_EQUALS("\n\n\n\n\n0x1", preprocess(code)); + + const char code2[] = "#define ADDER_S(a, b) a + b\n" // #374 + "#define ADDER(x) ADDER_S(x)\n" + "#define ARGUMENTS 1, 2\n" + "#define RUN ADDER(ARGUMENTS)\n" + "void f() { RUN; }\n"; + ASSERT_EQUALS("\n\n\n\nvoid f ( ) { 1 + 2 ; }", preprocess(code2)); } static void define_define_12()