File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
unit/java_bytecode/java_bytecode_convert_method Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1414#include < testing-utils/run_test_with_compilers.h>
1515#include < testing-utils/require_symbol.h>
1616#include < util/expr_iterator.h>
17+ #include < goto-programs/class_hierarchy.h>
1718
1819struct lambda_assignment_test_datat
1920{
@@ -85,6 +86,24 @@ void validate_lamdba_assignement(
8586 require_type::require_complete_class (lambda_implementor_type_symbol.type );
8687
8788 REQUIRE (tmp_lambda_class_type.has_base (test_data.lambda_interface ));
89+ REQUIRE (tmp_lambda_class_type.has_base (" java::java.lang.Object" ));
90+
91+ class_hierarchyt class_hierarchy;
92+ class_hierarchy (symbol_table);
93+
94+ const auto &parents = class_hierarchy.get_parents_trans (tmp_class_identifier);
95+ REQUIRE_THAT (
96+ parents,
97+ Catch::Matchers::Vector::ContainsElementMatcher<irep_idt>{
98+ test_data.lambda_interface });
99+
100+ const auto &interface_children =
101+ class_hierarchy.get_children_trans (test_data.lambda_interface );
102+
103+ REQUIRE_THAT (
104+ interface_children,
105+ Catch::Matchers::Vector::ContainsElementMatcher<irep_idt>{
106+ tmp_class_identifier});
88107
89108 THEN (" The function in the class should call the lambda method" )
90109 {
You can’t perform that action at this time.
0 commit comments