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 a [de]serialization unit test for the Bytes #1933

Closed
wants to merge 2 commits into from
Closed

Add a [de]serialization unit test for the Bytes #1933

wants to merge 2 commits into from

Conversation

pbeza
Copy link
Collaborator

@pbeza pbeza commented May 14, 2024

No description provided.

haraldh and others added 2 commits May 14, 2024 16:13
Don't assume we only use serde_json...

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>

#[test]
fn test_bytes_serde() {
use bincode::{deserialize, serialize};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshedding: probably using fully qualified paths here would be more expressive.

Comment on lines +87 to +88
#[test]
fn test_bytes_serde() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are to test differences between serializer, it might also make sense to add:

  • Tests for human-readable (de)serialization, e.g. serde_json (though I guess it's kinda covered by the test above).
  • Snapshot tests for bincode serialization (we don't want to accidentally break repr there)

@haraldh
Copy link
Collaborator

haraldh commented May 15, 2024

added this to #1928

1 similar comment
@haraldh
Copy link
Collaborator

haraldh commented May 15, 2024

added this to #1928

@haraldh haraldh closed this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants