@@ -606,42 +606,36 @@ SCENARIO(
606
606
{
607
607
THEN (" We should be able to get the list of exceptions it throws" )
608
608
{
609
- const symbolt &class_symbol =
610
- new_symbol_table.lookup_ref (" java::ThrowsExceptions" );
611
609
const symbolt &method_symbol =
612
610
new_symbol_table.lookup_ref (" java::ThrowsExceptions.test:()V" );
613
611
const java_method_typet method =
614
612
to_java_method_type (method_symbol.type );
615
- const std::vector<irept > exceptions = method.throws_exceptions ();
613
+ const std::vector<irep_idt > exceptions = method.throws_exceptions ();
616
614
REQUIRE (exceptions.size () == 2 );
617
615
REQUIRE (
618
616
std::find (
619
- exceptions.begin (), exceptions.end (), irept (" CustomException" )) !=
620
- exceptions.end ());
617
+ exceptions.begin (),
618
+ exceptions.end (),
619
+ irept (" CustomException" ).id ()) != exceptions.end ());
621
620
REQUIRE (
622
621
std::find (
623
622
exceptions.begin (),
624
623
exceptions.end (),
625
- irept (" java.io.IOException" )) != exceptions.end ());
624
+ irept (" java.io.IOException" ). id () ) != exceptions.end ());
626
625
}
627
626
}
628
- }
629
-
630
- const symbol_tablet &new_symbol_table2 = load_java_class (
631
- " ThrowsExceptions" , " ./java_bytecode/java_bytecode_parser" );
632
- WHEN (
633
- " Parsing the exceptions attribute for a method that throws no exceptions" )
634
- {
635
- 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" )
636
629
{
637
- const symbolt &class_symbol =
638
- new_symbol_table2.lookup_ref (" java::ThrowsExceptions" );
639
- const symbolt &method_symbol =
640
- new_symbol_table2.lookup_ref (" java::ThrowsExceptions.test:()V" );
641
- const java_method_typet method = to_java_method_type (method_symbol.type );
642
- const std::vector<irept> exceptions = method.throws_exceptions ();
643
- REQUIRE (exceptions.size () == 0 );
644
- }
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
+ }
645
639
}
646
640
}
647
641
}
0 commit comments