Fix dependency version numbers and update dev dependencies.

This commit is contained in:
Sebastian Schmidt 2022-02-20 09:54:24 +02:00
parent 44875d5860
commit da5036b5ea
2 changed files with 17 additions and 14 deletions

View File

@ -23,15 +23,15 @@ name = "evalexpr"
path = "src/lib.rs"
[dependencies]
regex = { version = "1", optional = true}
serde = { version = "1", optional = true}
serde_derive = { version = "1", optional = true}
regex = { version = "1.5.4", optional = true}
serde = { version = "1.0.133", optional = true}
serde_derive = { version = "1.0.133", optional = true}
[features]
serde_support = ["serde", "serde_derive"]
regex_support = ["regex"]
[dev-dependencies]
ron = "0.4"
rand = "0.7.0"
rand_pcg = "0.2.0"
ron = "0.7.0"
rand = "0.8.4"
rand_pcg = "0.3.1"

View File

@ -18,17 +18,20 @@ fn test_serde() {
fn test_serde_errors() {
assert_eq!(
ron::de::from_str::<Node>("[\"5==5\"]"),
Err(ron::de::Error::Parser(
ron::de::ParseError::ExpectedString,
ron::de::Position { col: 1, line: 1 }
))
Err(ron::Error {
code: ron::de::ErrorCode::ExpectedString,
position: ron::de::Position { col: 1, line: 1 }
})
);
assert_eq!(
ron::de::from_str::<Node>("\"&\""),
Err(ron::de::Error::Message(
Err(ron::Error {
code: ron::de::ErrorCode::Message(
"Found a partial token '&' that should be followed by another partial token."
.to_owned()
))
),
position: ron::de::Position { line: 0, col: 0 }
})
);
// Ensure that this does not panic.
assert_ne!(