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