Skip to content

Commit ca17f8d

Browse files
author
thk123
committed
Adding test about the type
1 parent 022fd7f commit ca17f8d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

jbmc/unit/java_bytecode/goto_program_generics/generic_parameters_test.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ SCENARIO(
102102
require_goto_statements::require_entry_point_argument_assignment(
103103
"this", entry_point_code);
104104

105+
THEN("Type of multiple generic fields should be right")
106+
{
107+
const typet &class_type = symbol_table.lookup_ref("java::GenericFields$MultipleGenericFields").type;
108+
109+
const auto &component = require_type::require_component(
110+
to_java_class_type(class_type), "field_input2");
111+
112+
const java_generic_typet &type = require_type::require_java_generic_type(component.type());
113+
require_type::require_pointer(type.generic_type_arguments()[0], symbol_typet{"java::BWrapper"});
114+
}
115+
105116
THEN("Object 'this' has field 'field_input1' of type Wrapper")
106117
{
107118
const auto &field_input1_name =

0 commit comments

Comments
 (0)