diff --git a/test/testsimplifytemplate.cpp b/test/testsimplifytemplate.cpp index 9316a6bf9..09f4aacbb 100644 --- a/test/testsimplifytemplate.cpp +++ b/test/testsimplifytemplate.cpp @@ -3136,6 +3136,14 @@ private: "struct b<1,false> { } ;"; ASSERT_EQUALS(exp, tok(code)); } + { + const char code[] = "template struct b {};\n" + "b<1> b1;"; + const char exp[] = "struct b<1,true> ; " + "b<1,true> b1 ; " + "struct b<1,true> { } ;"; + ASSERT_EQUALS(exp, tok(code)); + } { const char code[] = "template struct b {};\n" "b<1> b1;"; @@ -3152,6 +3160,22 @@ private: "struct b<1,true> { } ;"; ASSERT_EQUALS(exp, tok(code)); } + { + const char code[] = "template struct b {};\n" + "b<1> b1;"; + const char exp[] = "struct b<1,true> ; " + "b<1,true> b1 ; " + "struct b<1,true> { } ;"; + ASSERT_EQUALS(exp, tok(code)); + } + { + const char code[] = "template = 0> struct b {};\n" + "b<1> b1;"; + const char exp[] = "struct b<1,true> ; " + "b<1,true> b1 ; " + "struct b<1,true> { } ;"; + ASSERT_EQUALS(exp, tok(code)); + } } void template132() { // #9250