You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
Currently, x == encode(decode(x)) is enforced at processor.
However, for efficiency and consistency, this should be implemented in decode of the codec.
While decoding,
It should fail if existing field number in the schema does not exist in the binary, except for array. (empty array is allow not to appear in the binary)
It should fail if additional data exist in the binary regardless of position
Additionally, missing tests in the acceptance criteria should be implemented.
Acceptance Criteria
Decoding sint... values (using readSInt...) that are out of range. Expected: Decoding should fail
Decoding a boolean value where the value is a byte unequal to 0x00 and 0x01. Expected: Decoding should fail
Encoding a string that contains some non-ASCII characters. Expected: Encoding succeeds
Decoding a string that contains some non-ASCII characters. Expected: Decoding succeeds
Encoding empty array, where the datatype of the items implies non-packed encoding, e.g. string. Expected: binary message is empty
Schema contains a property of type array, where the datatype of the items implies non-packed encoding, e.g. string. The binary message is empty Expected: Decoded to the property that contains an empty array.
Object to encode has a property that is not contained in the schema. Expected: Encoding fails
Decoding a binary message that does not respect the fieldNumber order. Expected: Decoding fails
Decoding a binary message where one fieldNumber is used twice in the binary message. The fieldNumber order is repected, i.e., the two key-value pairs with the same fieldNumber must be adjacent in the binary message. Expected: Decoding fails
Encoding an object where the fieldNumbers in the schema are not sequential Expected: Encoding succeeds
Decoding a binary message where the fieldNumbers in the schema are not sequential Expected: Decoding succeeds
Decoding a binary message where one required property (not of type array) is not contained in the binary message Expected: Decoding fails
Decoding a binary message that contains a field number not present in the schema. Expected: Decoding fails
Decoding a binary message that contains some bytes at the end that cannot be decoded to some key-value pairs. E.g., a binary message contatenated with the byte 0x00. Expected: Decoding fails
A binary message contains a key-value pair for a property of type array for which packed encoding is used (for example boolean), and the value exist as empty bytes. Expected: Decoding fails
Additional Information
Most of the tests should be covered by adding protocol spec.
The text was updated successfully, but these errors were encountered:
Description
Currently,
x == encode(decode(x))
is enforced at processor.However, for efficiency and consistency, this should be implemented in decode of the codec.
While decoding,
Additionally, missing tests in the acceptance criteria should be implemented.
Acceptance Criteria
Additional Information
Most of the tests should be covered by adding protocol spec.
The text was updated successfully, but these errors were encountered: