Skip to content

xtypes_v2_struct_test_suite_struct_different_ids_ok uses different samples for json and xml #7

@disganaitis

Description

@disganaitis

dds-xtypes/test_suite.py

Lines 880 to 888 in 2beca33

'struct_different_ids_ok': {
'common_args': ['-X xml/types/struct_names.xml'],
'apps': ['pub-exe -P -t test -y Test::struct_1 -V xml/data/struct_num_x1_x5.xml -J json/data/struct_num_x1_x5.json',
'sub-exe -S -t test -y Test::struct_2 -V xml/data/struct_num_x1_x5.xml -J json/data/struct_num_x5.json'],
'expected_codes': [ReturnCode.OK, ReturnCode.OK],
'check_function': tsf.data_is_correct,
'title': '',
'description': ''
},

The XML data samples assume that members are assigned both based on ID and based on member names which could potentially lead to two publisher members being assigned to one subscriber member, this assumption is not made with the json data
<struct name="struct_1" extensibility="mutable">
<member name="x1" type="int32" id="1" />
<member name="x5" type="int32" id="5" /> <!-- so we have a member in common -->
</struct>
<struct name="struct_2" extensibility="mutable">
<member name="x1" type="int32" id="2" />
<member name="x5" type="int32" id="5" />
</struct>

<struct>
<x1>1</x1>
<x5>5</x5>
</struct>

{
"x1":1,
"x5":5
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions