File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
regression/cbmc-java/exceptions18 Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 11CORE
22Test.class
33--function Test.goo
4- ^EXIT=0 $
4+ ^EXIT=10 $
55^SIGNAL=0$
6- ^VERIFICATION SUCCESSFUL$
6+ ^VERIFICATION FAILED$
7+ no uncaught exception: FAILURE
78--
89^warning: ignoring
Original file line number Diff line number Diff line change @@ -294,6 +294,16 @@ void java_record_outputs(
294294 output.add_source_location ()=function.location ;
295295
296296 init_code.move_to_operands (output);
297+
298+ // check that there is no uncaught exception
299+ code_assertt assert_no_exception;
300+ assert_no_exception.assertion () =
301+ equal_exprt (exc_symbol.symbol_expr (),
302+ null_pointer_exprt (to_pointer_type (exc_symbol.type )));
303+ source_locationt assert_location = function.location ;
304+ assert_location.set_comment (" no uncaught exception" );
305+ assert_no_exception.add_source_location () = assert_location;
306+ init_code.move_to_operands (assert_no_exception);
297307}
298308
299309main_function_resultt get_main_symbol (
You can’t perform that action at this time.
0 commit comments