Skip to content

Commit

Permalink
extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Apr 25, 2023
1 parent 6f89842 commit 1e32507
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/serialization.rs
Expand Up @@ -89,3 +89,12 @@ fn serialize_and_deserialize() -> Result<()> {
assert_eq!(42, after.into_iter().next().unwrap().1);
Ok(())
}

#[test]
fn empty_map_serde() -> Result<()> {
let before: Map<u8, u8, 8> = Map::new();
let bytes: Vec<u8> = serialize(&before)?;
let after: Map<u8, u8, 8> = deserialize(&bytes)?;
assert!(after.is_empty());
Ok(())
}

0 comments on commit 1e32507

Please sign in to comment.