@@ -606,8 +606,6 @@ SCENARIO(
606606 {
607607 THEN (" We should be able to get the list of exceptions it throws" )
608608 {
609- const symbolt &class_symbol =
610- new_symbol_table.lookup_ref (" java::ThrowsExceptions" );
611609 const symbolt &method_symbol =
612610 new_symbol_table.lookup_ref (" java::ThrowsExceptions.test:()V" );
613611 const java_method_typet method =
@@ -626,23 +624,18 @@ SCENARIO(
626624 irept (" java.io.IOException" ).id ()) != exceptions.end ());
627625 }
628626 }
629- }
630-
631- const symbol_tablet &new_symbol_table2 = load_java_class (
632- " ThrowsExceptions" , " ./java_bytecode/java_bytecode_parser" );
633- WHEN (
634- " Parsing the exceptions attribute for a method that throws no exceptions" )
635- {
636- THEN (" We should be able to get the list of exceptions it throws" )
627+ WHEN (
628+ " Parsing the exceptions attribute for a method that throws no exceptions" )
637629 {
638- const symbolt &class_symbol =
639- new_symbol_table2.lookup_ref (" java::ThrowsExceptions" );
640- const symbolt &method_symbol =
641- new_symbol_table2.lookup_ref (" java::ThrowsExceptions.test:()V" );
642- const java_method_typet method = to_java_method_type (method_symbol.type );
643- const std::vector<irept> exceptions = method.throws_exceptions ();
644- REQUIRE (exceptions.size () == 0 );
645- }
630+ THEN (" We should be able to get the list of exceptions it throws" )
631+ {
632+ const symbolt &method_symbol = new_symbol_table.lookup_ref (
633+ " java::ThrowsExceptions.testNoExceptions:()V" );
634+ const java_method_typet method =
635+ to_java_method_type (method_symbol.type );
636+ const std::vector<irep_idt> exceptions = method.throws_exceptions ();
637+ REQUIRE (exceptions.size () == 0 );
638+ }
646639 }
647640 }
648641}
0 commit comments