diff --git a/test/testsimplifytokens.cpp b/test/testsimplifytokens.cpp index bec2b1df1..ac3b18d3d 100644 --- a/test/testsimplifytokens.cpp +++ b/test/testsimplifytokens.cpp @@ -1010,6 +1010,32 @@ private: " { int ar [ 5 ] ; }"); ASSERT_EQUALS(expected, sizeof_(code)); } + { + const char code[] = "template \n" + "class A\n" + "{ T ar[n]; };\n" + "\n" + "void f()\n" + "{\n" + " A a1;\n" + " A a2;\n" + "}\n"; + + // The expected result.. + const std::string expected(" template < class T , int n >" + " class A" + " { T ar [ n ] ; } ;" + " void f ( )" + " {" + " A a1 ;" + " A a2 ;" + " }" + " class A" + " { int ar [ 2 ] ; }" + " class A" + " { int ar [ 3 ] ; }"); + TODO_ASSERT_EQUALS(expected, sizeof_(code)); + } } void template_typename()