Skip to content

Commit 63254b3

Browse files
committed
Fixed uncaught exception in testbufferoverrun.cpp
1 parent 825b8b7 commit 63254b3

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

cli/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ int main(int argc, char* argv[])
110110
{
111111
// MS Visual C++ memory leak debug tracing
112112
#if defined(_MSC_VER) && defined(_DEBUG)
113-
_CrtSetDbgFlag( _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG ) | _CRTDBG_LEAK_CHECK_DF);
113+
_CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF);
114114
#endif
115115

116116
CppCheckExecutor exec;

test/testbufferoverrun.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3757,12 +3757,11 @@ class TestBufferOverrun : public TestFixture {
37573757

37583758
void executionPaths4() {
37593759
// Ticket #2386 - Segmentation fault upon strange syntax
3760-
epcheck("void f() {\n"
3761-
" switch ( x ) {\n"
3762-
" case struct Tree : break;\n"
3763-
" }\n"
3764-
"}");
3765-
ASSERT_EQUALS("", errout.str());
3760+
ASSERT_THROW(epcheck("void f() {\n"
3761+
" switch ( x ) {\n"
3762+
" case struct Tree : break;\n"
3763+
" }\n"
3764+
"}"), InternalError);
37663765
}
37673766

37683767
void executionPaths5() {

0 commit comments

Comments
 (0)