Fixed uncaught exception in testbufferoverrun.cpp

This commit is contained in:
PKEuS 2014-03-27 19:54:52 +01:00
parent 825b8b7c66
commit 63254b33f9
2 changed files with 6 additions and 7 deletions

View File

@ -110,7 +110,7 @@ int main(int argc, char* argv[])
{
// MS Visual C++ memory leak debug tracing
#if defined(_MSC_VER) && defined(_DEBUG)
_CrtSetDbgFlag( _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ) | _CRTDBG_LEAK_CHECK_DF);
_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF);
#endif
CppCheckExecutor exec;

View File

@ -3757,12 +3757,11 @@ private:
void executionPaths4() {
// Ticket #2386 - Segmentation fault upon strange syntax
epcheck("void f() {\n"
" switch ( x ) {\n"
" case struct Tree : break;\n"
" }\n"
"}");
ASSERT_EQUALS("", errout.str());
ASSERT_THROW(epcheck("void f() {\n"
" switch ( x ) {\n"
" case struct Tree : break;\n"
" }\n"
"}"), InternalError);
}
void executionPaths5() {