Ticket #3581 - added missing newlines to the test code
This commit is contained in:
parent
8f827aa65f
commit
69567515ce
|
@ -4586,31 +4586,31 @@ private:
|
||||||
ASSERT_EQUALS("[test.cpp:4]: (error) Memory pointed to by 'p' is freed twice.\n", errout.str());
|
ASSERT_EQUALS("[test.cpp:4]: (error) Memory pointed to by 'p' is freed twice.\n", errout.str());
|
||||||
|
|
||||||
check(
|
check(
|
||||||
"~LineMarker() {"
|
"~LineMarker() {\n"
|
||||||
" delete pxpm;"
|
" delete pxpm;\n"
|
||||||
"}"
|
"}\n"
|
||||||
"LineMarker &operator=(const LineMarker &) {"
|
"LineMarker &operator=(const LineMarker &) {\n"
|
||||||
" delete pxpm;"
|
" delete pxpm;\n"
|
||||||
" pxpm = NULL;"
|
" pxpm = NULL;\n"
|
||||||
" return *this;"
|
" return *this;\n"
|
||||||
"}"
|
"}"
|
||||||
);
|
);
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
check(
|
check(
|
||||||
"void bug()"
|
"void foo()\n"
|
||||||
"{"
|
"{\n"
|
||||||
" int* ptr = NULL;"
|
" int* ptr = NULL;\n"
|
||||||
" try"
|
" try\n"
|
||||||
" {"
|
" {\n"
|
||||||
" ptr = new int(4);"
|
" ptr = new int(4);\n"
|
||||||
" }"
|
" }\n"
|
||||||
" catch(...)"
|
" catch(...)\n"
|
||||||
" {"
|
" {\n"
|
||||||
" delete ptr;"
|
" delete ptr;\n"
|
||||||
" throw;"
|
" throw;\n"
|
||||||
" }"
|
" }\n"
|
||||||
" delete ptr;"
|
" delete ptr;\n"
|
||||||
"}"
|
"}"
|
||||||
);
|
);
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
Loading…
Reference in New Issue