testmemleak: Added todo 'forwhile7'

This commit is contained in:
Daniel Marjamäki 2008-11-10 20:30:47 +00:00
parent 90635eced7
commit 607a4337ec
1 changed files with 20 additions and 0 deletions

View File

@ -88,6 +88,7 @@ private:
TEST_CASE( forwhile4 ); TEST_CASE( forwhile4 );
TEST_CASE( forwhile5 ); TEST_CASE( forwhile5 );
TEST_CASE( forwhile6 ); TEST_CASE( forwhile6 );
// TODO TEST_CASE( forwhile7 );
TEST_CASE( dowhile1 ); TEST_CASE( dowhile1 );
@ -490,6 +491,25 @@ private:
} }
void forwhile7()
{
// TODO
check("void f()\n"
"{\n"
" for (int i = 0; i < j; i++)\n"
" {\n"
" char *str = strdup(\"hello\");\n"
" if (condition)\n"
" break;\n"
" free(str);\n"
" }\n"
"}\n");
ASSERT_EQUALS( std::string("[test.cpp:7]: Memory leak: str\n"), errout.str() );
}
void dowhile1() void dowhile1()