Skip to content

Loss of information on Keys #9

@disganaitis

Description

@disganaitis

dds-xtypes/test_suite.py

Lines 990 to 1004 in 2beca33

'struct_key_string_3': {
# CT: reader type @key has smaller string bound than writer type, I don't think should match
# -- i expect INCONSISTENT_TOPIC here...
# ignore_string_bounds is true for this test, but I still think _key_ strings should not match if reader's bound is < writer's bound
# maybe it is not clear exactly "where and when" the 'ignore_xyz' flags apply in the spec.
# [don't we try to avoid cases where multiple instances at the Writer will coalesce into one instance at the Reader?]
# -- and, that makes me wonder about a "@try_construct(use_default) enum" as union discriminator, which could also coalesce instances
'common_args': ['-X xml/types/struct_names.xml'],
'apps': ['pub-exe -P -t test -y Test::struct_key_string20 -V xml/data/struct_str_x1.xml -J json/data/struct_str_x1.json',
'sub-exe -S -t test -y Test::struct_key_string10 -V xml/data/struct_str_x1.xml -J json/data/struct_str_x1.json'],
'expected_codes': [ReturnCode.OK, ReturnCode.OK],
'check_function': tsf.data_is_correct,
'title': '',
'description': ''
},

dds-xtypes/test_suite.py

Lines 1034 to 1044 in 2beca33

'struct_key_seq_2': {
# CT: reader type @key has smaller seq bound than writer type, I don't think should match
# -- i expect INCONSISTENT_TOPIC here...
'common_args': ['-X xml/types/struct_names.xml'],
'apps': ['pub-exe -P -t test -y Test::struct_key_seq20 -V xml/data/struct_seq.xml -J json/data/struct_seq.json',
'sub-exe -S -t test -y Test::struct_key_seq10 -V xml/data/struct_seq.xml -J json/data/struct_seq.json'],
'expected_codes': [ReturnCode.OK, ReturnCode.OK],
'check_function': tsf.data_is_correct,
'title': '',
'description': ''
},

dds-xtypes/test_suite.py

Lines 1054 to 1064 in 2beca33

'struct_key_struct_2': {
# CT: reader type @key has smaller string bound than writer type, I don't think should match
# -- i expect INCONSISTENT_TOPIC here...
'common_args': ['-X xml/types/struct_names.xml'],
'apps': ['pub-exe -P -t test -y Test::struct_key_struct_2 -V xml/data/struct_str_key.xml -J json/data/struct_str_key.json',
'sub-exe -S -t test -y Test::struct_key_struct_1 -V xml/data/struct_str_key.xml -J json/data/struct_str_key.json'],
'expected_codes': [ReturnCode.OK, ReturnCode.OK],
'check_function': tsf.data_is_correct,
'title': '',
'description': ''
},

While it is true that Ignore bounds is set to true, the reasoning behind the key bound limitations is explicit int Table 19 of DDS-XTypes v1.3

"Note: The rules regarding key members ensure that the key of T2 can be transformed faithfully into the key of T1 without aliasing or loss of information."

Therefore ignoring bounds would disregard the intention behind the key based rules

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