Skip to content

Commit

Permalink
Refs #20419: Fixes for unions
Browse files Browse the repository at this point in the history
Signed-off-by: adriancampo <[email protected]>
  • Loading branch information
adriancampo committed Apr 4, 2024
1 parent 6f2d9be commit ba7f9e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -831,17 +831,17 @@ check_union_member(member, parent) ::= <<
EXPECT_EQ($member.name$_expected_flags, type_objects.complete_type_object.complete().union_type().member_seq()[pos].common().member_flags());
TypeIdentifierPair member_type_ids;
$get_type_identifier(type=member.typecode, var="member_type_ids")$
EXPECT_TRUE(member_type_ids.type_identifier1() == type_objects.minimal_type_object.minimal().union_type().member_seq()[pos].common().type_id() ||
member_type_ids.type_identifier1() == type_objects.complete_type_object.complete().union_type().member_seq()[pos].common().type_id());
EXPECT_TRUE(compare_type_identifiers(member_type_ids.type_identifier1(), type_objects.minimal_type_object.minimal().union_type().member_seq()[pos].common().type_id()) ||
compare_type_identifiers(member_type_ids.type_identifier1(), type_objects.complete_type_object.complete().union_type().member_seq()[pos].common().type_id()));
if (TK_NONE == member_type_ids.type_identifier2()._d())
{
EXPECT_EQ(type_objects.minimal_type_object.minimal().union_type().member_seq()[pos].common().type_id(),
type_objects.complete_type_object.complete().union_type().member_seq()[pos].common().type_id());
EXPECT_TRUE(compare_type_identifiers(type_objects.minimal_type_object.minimal().union_type().member_seq()[pos].common().type_id(),
type_objects.complete_type_object.complete().union_type().member_seq()[pos].common().type_id()));
}
else
{
EXPECT_TRUE(member_type_ids.type_identifier2() == type_objects.minimal_type_object.minimal().union_type().member_seq()[pos].common().type_id() ||
member_type_ids.type_identifier2() == type_objects.complete_type_object.complete().union_type().member_seq()[pos].common().type_id());
EXPECT_TRUE(compare_type_identifiers(member_type_ids.type_identifier2(), type_objects.minimal_type_object.minimal().union_type().member_seq()[pos].common().type_id()) ||
compare_type_identifiers(member_type_ids.type_identifier2(), type_objects.complete_type_object.complete().union_type().member_seq()[pos].common().type_id()));
}
$member.labels: { label | $check_label(label=label)$}; separator="\n"$
ASSERT_EQ($member.labelsSize$, type_objects.minimal_type_object.minimal().union_type().member_seq()[pos].common().label_seq().size());
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/dds-types-test

0 comments on commit ba7f9e9

Please sign in to comment.