Skip to content

Commit 328bc04

Browse files
committed
Amend generics test to expect tag types rather than plain structs
1 parent 7b17821 commit 328bc04

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

jbmc/unit/java_bytecode/goto_program_generics/generic_parameters_test.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,9 @@ SCENARIO(
316316

317317
// Trace the assignments back to the declaration of the generic type
318318
// and verify that it is what we expect.
319-
const auto &tmp_object_struct =
320-
to_struct_type(tmp_object_declaration.symbol().type());
321-
REQUIRE(tmp_object_struct.get_tag() == "Wrapper");
319+
const auto &tmp_object_struct_tag =
320+
to_struct_tag_type(tmp_object_declaration.symbol().type());
321+
REQUIRE(tmp_object_struct_tag.get_identifier() == "java::Wrapper");
322322

323323
THEN("Object 'v' has field 'field' of type IWrapper")
324324
{
@@ -366,9 +366,9 @@ SCENARIO(
366366

367367
// Trace the assignments back to the declaration of the generic type
368368
// and verify that it is what we expect.
369-
const auto &tmp_object_struct =
370-
to_struct_type(tmp_object_declaration.symbol().type());
371-
REQUIRE(tmp_object_struct.get_tag() == "Wrapper");
369+
const auto &tmp_object_struct_tag =
370+
to_struct_tag_type(tmp_object_declaration.symbol().type());
371+
REQUIRE(tmp_object_struct_tag.get_identifier() == "java::Wrapper");
372372

373373
THEN(
374374
"Object 'v' has field 'field' of type Object (upper bound of the "
@@ -416,11 +416,11 @@ SCENARIO(
416416

417417
// Trace the assignments back to the declaration of the generic type
418418
// and verify that it is what we expect.
419-
const auto &tmp_object_struct =
420-
to_struct_type(tmp_object_declaration.symbol().type());
419+
const auto &tmp_object_struct_tag =
420+
to_struct_tag_type(tmp_object_declaration.symbol().type());
421421
REQUIRE(
422-
tmp_object_struct.get_tag() ==
423-
"GenericFields$GenericInnerOuter$Outer");
422+
tmp_object_struct_tag.get_identifier() ==
423+
"java::GenericFields$GenericInnerOuter$Outer");
424424

425425
THEN("Object 'v' has field 'field' of type InnerClass")
426426
{
@@ -481,11 +481,11 @@ SCENARIO(
481481

482482
// Trace the assignments back to the declaration of the generic type
483483
// and verify that it is what we expect.
484-
const auto &tmp_object_struct =
485-
to_struct_type(tmp_object_declaration.symbol().type());
484+
const auto &tmp_object_struct_tag =
485+
to_struct_tag_type(tmp_object_declaration.symbol().type());
486486
REQUIRE(
487-
tmp_object_struct.get_tag() ==
488-
"GenericFields$GenericRewriteParameter$A");
487+
tmp_object_struct_tag.get_identifier() ==
488+
"java::GenericFields$GenericRewriteParameter$A");
489489

490490
THEN("Object 'v' has field 'value' of type Integer")
491491
{

0 commit comments

Comments
 (0)