Skip to content

Commit

Permalink
feat: ensure successful round-trip of RON (#193)
Browse files Browse the repository at this point in the history
* feat: ensure successful round-trip of RON

* oops
  • Loading branch information
Eh2406 committed Apr 9, 2024
1 parent 1bdc713 commit 21c6a21
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ log = "0.4.14" # for debug logs in tests

[dev-dependencies]
proptest = "1.4.0"
ron = "0.8.1"
ron = "=0.9.0-alpha.0"
varisat = "0.2.2"
criterion = "0.5"
env_logger = "0.11.3"
Expand Down
10 changes: 10 additions & 0 deletions src/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,16 @@ pub mod tests {

proptest! {

// Testing serde ----------------------------------

#[cfg(feature = "serde")]
#[test]
fn serde_round_trip(range in strategy()) {
let s = ron::ser::to_string(&range).unwrap();
let r = ron::de::from_str(&s).unwrap();
assert_eq!(range, r);
}

// Testing negate ----------------------------------

#[test]
Expand Down

0 comments on commit 21c6a21

Please sign in to comment.