added a todo testcase for ticket #1788

This commit is contained in:
Martin Ettl 2010-06-11 13:23:10 +02:00
parent be9c23cb1a
commit 81828742ac
1 changed files with 23 additions and 0 deletions

View File

@ -2849,6 +2849,7 @@ private:
TEST_CASE(class13); TEST_CASE(class13);
TEST_CASE(class14); TEST_CASE(class14);
TEST_CASE(class15); TEST_CASE(class15);
TEST_CASE(class16);
TEST_CASE(staticvar); TEST_CASE(staticvar);
@ -3147,6 +3148,28 @@ private:
ASSERT_EQUALS("", errout.str()); ASSERT_EQUALS("", errout.str());
} }
void class16() // ticket 1788
{
check("template <class T> class A\n"
"{\n"
" private:\n"
" int nn;\n"
" T *v;\n"
" public:\n"
" A(int n): nn(n), v(new T[n]) {};\n"
" ~A();\n"
"};\n"
"template <class T> A<T>::~A()\n"
"{\n"
" delete[] (v);\n"
"}\n"
"void foo()\n"
"{\n"
" A<double> v(1);\n"
"}\n");
TODO_ASSERT_EQUALS("", errout.str());
}
void staticvar() void staticvar()
{ {