tests: Added memory leak test that gives a false positive

This commit is contained in:
Daniel Marjamäki 2008-08-15 17:40:08 +00:00
parent 0ce33fe1da
commit fcbd297ff0
1 changed files with 10 additions and 0 deletions

View File

@ -608,6 +608,16 @@ static void memleak_in_function()
check( CheckMemoryLeak, __LINE__, code, "" ); check( CheckMemoryLeak, __LINE__, code, "" );
code = "static char *f()\n"
"{\n"
" char *s = new char[10];\n"
" if ( s )\n"
" {\n"
" return s;\n"
" }\n"
" return 0;\n"
"}\n";
check( CheckMemoryLeak, __LINE__, code, "" );