Skip to content

Commit e37c055

Browse files
committed
test.cpp: added test for #66
1 parent e7dbdce commit e37c055

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,16 @@ static void define20() // #113
847847
"void foo ( const y < T1 , T2 , T3 , T4 > & x ) { }", preprocess(code));
848848
}
849849

850+
static void define21() // #66
851+
{
852+
const char code[] = "#define GETMYID(a) ((a))+1\n"
853+
"#define FIGHT_FOO(c, ...) foo(c, ##__VA_ARGS__)\n"
854+
"FIGHT_FOO(1, GETMYID(a));\n";
855+
ASSERT_EQUALS("\n"
856+
"\n"
857+
"foo ( 1 , ( ( a ) ) + 1 ) ;", preprocess(code));
858+
}
859+
850860

851861
static void define_invalid_1()
852862
{
@@ -3828,6 +3838,7 @@ static void runTests(int argc, char **argv, Input input)
38283838
TEST_CASE(define18); // #130
38293839
TEST_CASE(define19); // #124
38303840
TEST_CASE(define20); // #113
3841+
TEST_CASE(define21); // #66
38313842
TEST_CASE(define_invalid_1);
38323843
TEST_CASE(define_invalid_2);
38333844
TEST_CASE(define_define_1);

0 commit comments

Comments
 (0)