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 // MS Visual C++ memory leak debug tracing
#if defined(_MSC_VER) && defined(_DEBUG) #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 #endif
CppCheckExecutor exec; CppCheckExecutor exec;

View File

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