Skip to content

Commit e7dbdce

Browse files
committed
test.cpp: added test for #113
1 parent ee23c27 commit e7dbdce

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

test.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,18 @@ static void define19() // #124
835835
"const Testsuffix ;", preprocess(code));
836836
}
837837

838+
static void define20() // #113
839+
{
840+
const char code[] = "#define TARGS4 T1,T2,T3,T4\n"
841+
"#define FOOIMPL(T__CLASS, TARGS) void foo(const T__CLASS<TARGS>& x) { }\n"
842+
"#define FOOIMPL_4(T__CLASS) FOOIMPL(T__CLASS, TARGS4)\n"
843+
"FOOIMPL_4(y)\n";
844+
ASSERT_EQUALS("\n"
845+
"\n"
846+
"\n"
847+
"void foo ( const y < T1 , T2 , T3 , T4 > & x ) { }", preprocess(code));
848+
}
849+
838850

839851
static void define_invalid_1()
840852
{
@@ -3815,6 +3827,7 @@ static void runTests(int argc, char **argv, Input input)
38153827
TEST_CASE(define17); // #185
38163828
TEST_CASE(define18); // #130
38173829
TEST_CASE(define19); // #124
3830+
TEST_CASE(define20); // #113
38183831
TEST_CASE(define_invalid_1);
38193832
TEST_CASE(define_invalid_2);
38203833
TEST_CASE(define_define_1);

0 commit comments

Comments
 (0)