Skip to content

Commit cbb2eff

Browse files
committed
Changes in the generics concretisation tests to correspond to the new class signatures.
1 parent f390795 commit cbb2eff

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

unit/java_bytecode/generate_concrete_generic_type/generate_java_generic_type.cpp

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ SCENARIO(
4040
"generate_java_generic_type_from_file",
4141
"[core][java_bytecode][generate_java_generic_type]")
4242
{
43-
auto expected_symbol=
44-
"java::generic_two_fields$bound_element<java::java.lang.Integer>";
43+
auto expected_symbol = "java::generic_two_fields$bound_element<Integer>";
4544

4645
GIVEN("A generic java type with two generic fields and a concrete "
4746
"substitution")
@@ -56,8 +55,8 @@ SCENARIO(
5655
REQUIRE(new_symbol_table.has_symbol(expected_symbol));
5756
THEN("The class should contain two instantiated fields.")
5857
{
59-
const auto &class_symbol=new_symbol_table.lookup(
60-
"java::generic_two_fields$bound_element<java::java.lang.Integer>");
58+
const auto &class_symbol = new_symbol_table.lookup(
59+
"java::generic_two_fields$bound_element<Integer>");
6160
const typet &symbol_type=class_symbol->type;
6261

6362
REQUIRE(symbol_type.id()==ID_struct);
@@ -89,10 +88,8 @@ SCENARIO(
8988
"generate_java_generic_type_from_file_two_params",
9089
"[core][java_bytecode][generate_java_generic_type]")
9190
{
92-
auto expected_symbol=
93-
"java::generic_two_parameters$KeyValuePair"
94-
"<java::java.lang.String,"
95-
"java::java.lang.Integer>";
91+
auto expected_symbol =
92+
"java::generic_two_parameters$KeyValuePair<String, Integer>";
9693

9794
GIVEN("A generic java type with two generic parameters, like a Hashtable")
9895
{
@@ -133,10 +130,8 @@ SCENARIO(
133130
// After we have loaded the class and converted the generics,
134131
// the presence of these two symbols in the symbol table is
135132
// proof enough that we did the work we needed to do correctly.
136-
auto first_expected_symbol=
137-
"java::generic_two_instances$element<java::java.lang.Boolean>";
138-
auto second_expected_symbol=
139-
"java::generic_two_instances$element<java::java.lang.Integer>";
133+
auto first_expected_symbol = "java::generic_two_instances$element<Boolean>";
134+
auto second_expected_symbol = "java::generic_two_instances$element<Integer>";
140135

141136
GIVEN("A generic java type with a field that refers to another generic with"
142137
" an uninstantiated parameter.")
@@ -284,9 +279,8 @@ SCENARIO(
284279
"There should be a specialised version of the class in the symbol "
285280
"table")
286281
{
287-
const irep_idt specialised_class_name = id2string(harness_class) + "$" +
288-
id2string(inner_class) +
289-
"<java::java.lang.Float>";
282+
const irep_idt specialised_class_name =
283+
id2string(harness_class) + "$" + id2string(inner_class) + "<Float>";
290284
REQUIRE(new_symbol_table.has_symbol(specialised_class_name));
291285

292286
const symbolt test_class_symbol =

0 commit comments

Comments
 (0)