astyle formatting
This commit is contained in:
parent
68e7003bb1
commit
a9d8f456ee
|
@ -2203,25 +2203,25 @@ private:
|
||||||
// #2733
|
// #2733
|
||||||
void func25()
|
void func25()
|
||||||
{
|
{
|
||||||
check("int* GetDeviceName(int a, int b)\n"
|
check("int* GetDeviceName(int a, int b)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" int *p = new int[255];\n"
|
" int *p = new int[255];\n"
|
||||||
" memset(p, 0, 255 * sizeof(int));\n"
|
" memset(p, 0, 255 * sizeof(int));\n"
|
||||||
" if(a)\n"
|
" if(a)\n"
|
||||||
" if(b)\n"
|
" if(b)\n"
|
||||||
" return p;\n"
|
" return p;\n"
|
||||||
" return NULL; \n"
|
" return NULL; \n"
|
||||||
"}\n");
|
"}\n");
|
||||||
TODO_ASSERT_EQUALS("[test.cpp:8]: (error) Memory leak: p\n","", errout.str());
|
TODO_ASSERT_EQUALS("[test.cpp:8]: (error) Memory leak: p\n","", errout.str());
|
||||||
|
|
||||||
check("int* GetDeviceName(int a)\n"
|
check("int* GetDeviceName(int a)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" int *p = new int[255];\n"
|
" int *p = new int[255];\n"
|
||||||
" memset(p, 0, 255 * sizeof(int));\n"
|
" memset(p, 0, 255 * sizeof(int));\n"
|
||||||
" if(a)\n"
|
" if(a)\n"
|
||||||
" return p;\n"
|
" return p;\n"
|
||||||
" return NULL; \n"
|
" return NULL; \n"
|
||||||
"}\n");
|
"}\n");
|
||||||
ASSERT_EQUALS("[test.cpp:7]: (error) Memory leak: p\n", errout.str());
|
ASSERT_EQUALS("[test.cpp:7]: (error) Memory leak: p\n", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue