astyle formatting

This commit is contained in:
Daniel Marjamäki 2011-04-19 20:13:10 +02:00
parent 68e7003bb1
commit a9d8f456ee
1 changed files with 17 additions and 17 deletions

View File

@ -2203,25 +2203,25 @@ private:
// #2733
void func25()
{
check("int* GetDeviceName(int a, int b)\n"
"{\n"
" int *p = new int[255];\n"
" memset(p, 0, 255 * sizeof(int));\n"
" if(a)\n"
" if(b)\n"
" return p;\n"
" return NULL; \n"
"}\n");
check("int* GetDeviceName(int a, int b)\n"
"{\n"
" int *p = new int[255];\n"
" memset(p, 0, 255 * sizeof(int));\n"
" if(a)\n"
" if(b)\n"
" return p;\n"
" return NULL; \n"
"}\n");
TODO_ASSERT_EQUALS("[test.cpp:8]: (error) Memory leak: p\n","", errout.str());
check("int* GetDeviceName(int a)\n"
"{\n"
" int *p = new int[255];\n"
" memset(p, 0, 255 * sizeof(int));\n"
" if(a)\n"
" return p;\n"
" return NULL; \n"
"}\n");
check("int* GetDeviceName(int a)\n"
"{\n"
" int *p = new int[255];\n"
" memset(p, 0, 255 * sizeof(int));\n"
" if(a)\n"
" return p;\n"
" return NULL; \n"
"}\n");
ASSERT_EQUALS("[test.cpp:7]: (error) Memory leak: p\n", errout.str());
}