Skip to content

Commit 21c6a21

Browse files
authored
feat: ensure successful round-trip of RON (#193)
* feat: ensure successful round-trip of RON * oops
1 parent 1bdc713 commit 21c6a21

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ log = "0.4.14" # for debug logs in tests
2929

3030
[dev-dependencies]
3131
proptest = "1.4.0"
32-
ron = "0.8.1"
32+
ron = "=0.9.0-alpha.0"
3333
varisat = "0.2.2"
3434
criterion = "0.5"
3535
env_logger = "0.11.3"

src/range.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,16 @@ pub mod tests {
862862

863863
proptest! {
864864

865+
// Testing serde ----------------------------------
866+
867+
#[cfg(feature = "serde")]
868+
#[test]
869+
fn serde_round_trip(range in strategy()) {
870+
let s = ron::ser::to_string(&range).unwrap();
871+
let r = ron::de::from_str(&s).unwrap();
872+
assert_eq!(range, r);
873+
}
874+
865875
// Testing negate ----------------------------------
866876

867877
#[test]

0 commit comments

Comments
 (0)