|
'union_different_ids_1': { |
|
'common_args': ['-X xml/types/unions.xml'], |
|
'apps': ['pub-exe -P -t test -y Test::union_1 -V xml/data/union_x1.xml -J json/data/union_x1.json', |
|
'sub-exe -S -t test -y Test::union_2 -V xml/data/union_x1.xml -J json/data/union_x1.json'], |
|
'expected_codes': [ReturnCode.INCONSISTENT_TOPIC, ReturnCode.INCONSISTENT_TOPIC], |
|
'check_function': tsf.data_is_correct, |
|
'title': '', |
|
'description': '' |
|
}, |
|
<union name="union_1" ><discriminator type="uint32" /> |
|
<case><caseDiscriminator value="1"/><member name="x1" type="int16" /></case> |
|
<case><caseDiscriminator value="2"/><member name="x2" type="int32" /></case> |
|
<case><caseDiscriminator value="3"/><member name="x3" type="int32" /></case> |
|
</union> |
|
|
|
<union name="union_2" ><discriminator type="uint32" /> |
|
<case><caseDiscriminator value="2"/><member name="x2" type="int32"/></case> |
|
<case><caseDiscriminator value="1"/><member name="x1" type="int16"/></case> |
|
<case><caseDiscriminator value="3"/><member name="x3" type="int32"/></case> |
|
</union> |
At this point in the test ignore_member_names is set to TRUE (union_different_ids_2 tests for FALSE), therefore the different names of the members do not impact assignability.
As per Table 19 of DDS-Xtypes v1.3 union assignability is based on discriminator values and not on ID values, therefore as each discriminator matches to an identical type - the unions are assignable
Additionally appendable extensibility does not have any explicitly differing behaviors from mutable extensibility, therefore the ordering of the discriminators should not affect assignability, such behavior is only explicitly defined for final extensibility
dds-xtypes/test_suite.py
Lines 1226 to 1234 in 2beca33
dds-xtypes/xml/types/unions.xml
Lines 61 to 71 in 2beca33
At this point in the test ignore_member_names is set to TRUE (union_different_ids_2 tests for FALSE), therefore the different names of the members do not impact assignability.
As per Table 19 of DDS-Xtypes v1.3 union assignability is based on discriminator values and not on ID values, therefore as each discriminator matches to an identical type - the unions are assignable
Additionally appendable extensibility does not have any explicitly differing behaviors from mutable extensibility, therefore the ordering of the discriminators should not affect assignability, such behavior is only explicitly defined for final extensibility