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 14
14
#include < testing-utils/run_test_with_compilers.h>
15
15
#include < testing-utils/require_symbol.h>
16
16
#include < util/expr_iterator.h>
17
+ #include < goto-programs/class_hierarchy.h>
17
18
18
19
struct lambda_assignment_test_datat
19
20
{
@@ -85,6 +86,24 @@ void validate_lamdba_assignement(
85
86
require_type::require_complete_class (lambda_implementor_type_symbol.type );
86
87
87
88
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});
88
107
89
108
THEN (" The function in the class should call the lambda method" )
90
109
{
You can’t perform that action at this time.
0 commit comments