We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3269329 commit 8ab4575Copy full SHA for 8ab4575
1 file changed
test/testexceptionsafety.cpp
@@ -506,6 +506,19 @@ class TestExceptionSafety : public TestFixture {
506
"}\n");
507
ASSERT_EQUALS("[test.cpp:6:5]: (error) Exception thrown in function that is an entry point. [throwInEntryPoint]\n",
508
errout_str());
509
+
510
+ check("void f(int i) {\n"
511
+ " if (i < 2)\n"
512
+ " throw 0;\n"
513
+ "}\n"
514
+ "int main(int argc, char* argv[]) {\n"
515
+ " try {\n"
516
+ " f(argc);\n"
517
+ " } catch (...) {\n"
518
+ " return 1;\n"
519
+ " }\n"
520
+ "}\n");
521
+ ASSERT_EQUALS("", errout_str());
522
}
523
};
524
0 commit comments