Added todo testcase for ticket #2705
This commit is contained in:
parent
f498e53cd2
commit
af632a6aa0
|
@ -231,6 +231,7 @@ private:
|
|||
TEST_CASE(func21); // Ticket #2569
|
||||
TEST_CASE(func22); // Ticket #2668
|
||||
TEST_CASE(func23); // Ticket #2667
|
||||
TEST_CASE(func24); // Ticket #2705
|
||||
|
||||
TEST_CASE(allocfunc1);
|
||||
TEST_CASE(allocfunc2);
|
||||
|
@ -2181,6 +2182,23 @@ private:
|
|||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
// #2705
|
||||
void func24()
|
||||
{
|
||||
check("void f(void) \n"
|
||||
"{\n"
|
||||
" std::string *x = new std::string;\n"
|
||||
"}\n");
|
||||
TODO_ASSERT_EQUALS("[test.cpp:3]: (error) Memory leak: x\n","", errout.str());
|
||||
|
||||
check("void f(void) \n"
|
||||
"{\n"
|
||||
" std::string *x = new std::string;\n"
|
||||
" delete x;\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void allocfunc1()
|
||||
{
|
||||
check("static char *a()\n"
|
||||
|
|
Loading…
Reference in New Issue