Correct the ups_alarm field spelling
The upstream River 3 schema spells field 355 `ups_alram`. Use `ups_alarm` in the decoder, the generated schema, and the field reference. The schema generator now applies a rename map, so a regenerated schema keeps the corrected name.
This commit is contained in:
@@ -189,6 +189,14 @@ def test_generator_keeps_reachable_types_and_ignores_unrelated_nested_types(gene
|
||||
assert 'Unrelated' not in messages
|
||||
|
||||
|
||||
def test_generator_corrects_upstream_field_spelling(generator):
|
||||
messages, _ = generator.parse_schema(
|
||||
'message DisplayPropertyUpload { optional bool ups_alram = 355; } message RuntimePropertyUpload {}'
|
||||
)
|
||||
assert messages['DisplayPropertyUpload'][355] == ('ups_alarm', 'bool', False)
|
||||
assert MESSAGES['DisplayPropertyUpload'][355] == ('ups_alarm', 'bool', False)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('body', [
|
||||
'optional Missing value = 1;',
|
||||
'optional uint32 a = 1; optional uint32 b = 1;',
|
||||
|
||||
Reference in New Issue
Block a user