Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add roundtrip test cases for the new encode functionality #7

Closed
gabhijit opened this issue Apr 12, 2022 · 1 comment · Fixed by #22
Closed

Add roundtrip test cases for the new encode functionality #7

gabhijit opened this issue Apr 12, 2022 · 1 comment · Fixed by #22
Assignees

Comments

@gabhijit
Copy link
Collaborator

Since we now have an implementation of aper::encode we should be able to take a buffer -> decode it -> encode the resulting struct to a buffer and assert that the resulting two buffers are identical.

@gabhijit
Copy link
Collaborator Author

Original and Encoded bufers -

Original: 0015400004001b1002f89800000000005241804d79206c6974746c6520674e4200660001000000000002f8980001000800800000010002f8390001001881c0001388001550
Encoded: 0015404a000004001b00084002f898000000000052400f06004d79206c6974746c6520674e420066001f01000000000002f8980001000800800000010002f8390001001881c00013880015400140

gabhijit added a commit that referenced this issue Apr 29, 2022
There was an issue with the Derive Macro of OPEN type that would cause
incorrect encoding. This was related to the handling of the length of
encoding an open type (which was missed in the original implementation).
With this fix, now we are able to perform a roundtrip
decode/encode/decode of a string and verify that the strings and types
are identical.

This should fix #7.
gabhijit added a commit that referenced this issue Apr 29, 2022
There was an issue with the Derive Macro of OPEN type that would cause
incorrect encoding. This was related to the handling of the length of
encoding an open type (which was missed in the original implementation).
With this fix, now we are able to perform a roundtrip
decode/encode/decode of a string and verify that the strings and types
are identical.

This should fix #7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant