Fix from_into.rs tests

This commit is contained in:
Alon Hearter 2023-08-07 18:22:49 +03:00
parent 11d8aea96f
commit 2691a35102
No known key found for this signature in database
1 changed files with 4 additions and 4 deletions

View File

@ -127,14 +127,14 @@ mod tests {
#[test] #[test]
fn test_trailing_comma() { fn test_trailing_comma() {
let p: Person = Person::from("Mike,32,"); let p: Person = Person::from("Mike,32,");
assert_eq!(p.name, "John"); assert_eq!(p.name, "Mike");
assert_eq!(p.age, 30); assert_eq!(p.age, 32);
} }
#[test] #[test]
fn test_trailing_comma_and_some_string() { fn test_trailing_comma_and_some_string() {
let p: Person = Person::from("Mike,32,man"); let p: Person = Person::from("Mike,32,man");
assert_eq!(p.name, "John"); assert_eq!(p.name, "Mike");
assert_eq!(p.age, 30); assert_eq!(p.age, 32);
} }
} }