File tree 2 files changed +13
-2
lines changed
regression/cbmc-java/exceptions18
2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
1
CORE
2
2
Test.class
3
3
--function Test.goo
4
- ^EXIT=0 $
4
+ ^EXIT=10 $
5
5
^SIGNAL=0$
6
- ^VERIFICATION SUCCESSFUL$
6
+ ^VERIFICATION FAILED$
7
+ no uncaught exception: FAILURE
7
8
--
8
9
^warning: ignoring
Original file line number Diff line number Diff line change @@ -294,6 +294,16 @@ void java_record_outputs(
294
294
output.add_source_location ()=function.location ;
295
295
296
296
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);
297
307
}
298
308
299
309
main_function_resultt get_main_symbol (
You can’t perform that action at this time.
0 commit comments