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

Do round trip tests #696

Open
pvdrz opened this issue May 9, 2024 · 0 comments
Open

Do round trip tests #696

pvdrz opened this issue May 9, 2024 · 0 comments

Comments

@pvdrz
Copy link
Contributor

pvdrz commented May 9, 2024

The current test suite relies on cargo-insta to do snapshot testing but it also has serialized versions of several structs as &'static strs inside the codebase. But, nothing guarantees that the snapshot and the embedded strings actually match each other, doing visual inspection is not practical when the text is several hundred lines long. Even if they were the same, there is duplicated information due to this.

I consider that the embedded strings should be removed and only keep the snapshot files. I'm not sure if cargo-insta provides a way to read the snapshot files so they can be used as deserialization inputs so that's a thing to consider.

Additionally extra tests could be added to verify that serializing -> deserializing and deserializing -> serializing are consistent.

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

No branches or pull requests

1 participant