Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
dvermd committed Nov 5, 2021
1 parent d1a5e8a commit 1a52464
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/stage2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,39 +638,39 @@ mod test {
#[test]
fn parsing_errors() {
assert_eq!(
crate::from_slice::<bool>(&mut b"time".to_vec()),
crate::serde::from_slice::<bool>(&mut b"time".to_vec()),
Err(Error::new(0, 't', ErrorType::ExpectedNull))
);
assert_eq!(
crate::from_slice::<bool>(&mut b"falsy".to_vec()),
crate::serde::from_slice::<bool>(&mut b"falsy".to_vec()),
Err(Error::new(0, 'f', ErrorType::ExpectedNull))
);
assert_eq!(
crate::from_slice::<bool>(&mut b"new".to_vec()),
crate::serde::from_slice::<bool>(&mut b"new".to_vec()),
Err(Error::new(0, 'n', ErrorType::ExpectedNull))
);
assert_eq!(
crate::from_slice::<bool>(&mut b"[true, time]".to_vec()),
crate::serde::from_slice::<bool>(&mut b"[true, time]".to_vec()),
Err(Error::new(7, 't', ErrorType::ExpectedBoolean))
);
assert_eq!(
crate::from_slice::<bool>(&mut b"[true, falsy]".to_vec()),
crate::serde::from_slice::<bool>(&mut b"[true, falsy]".to_vec()),
Err(Error::new(7, 'f', ErrorType::ExpectedBoolean))
);
assert_eq!(
crate::from_slice::<bool>(&mut b"[null, new]".to_vec()),
crate::serde::from_slice::<bool>(&mut b"[null, new]".to_vec()),
Err(Error::new(7, 'n', ErrorType::ExpectedNull))
);
assert_eq!(
crate::from_slice::<bool>(&mut br#"{"1":time}"#.to_vec()),
crate::serde::from_slice::<bool>(&mut br#"{"1":time}"#.to_vec()),
Err(Error::new(5, 't', ErrorType::ExpectedBoolean))
);
assert_eq!(
crate::from_slice::<bool>(&mut br#"{"0":falsy}"#.to_vec()),
crate::serde::from_slice::<bool>(&mut br#"{"0":falsy}"#.to_vec()),
Err(Error::new(5, 'f', ErrorType::ExpectedBoolean))
);
assert_eq!(
crate::from_slice::<bool>(&mut br#"{"0":new}"#.to_vec()),
crate::serde::from_slice::<bool>(&mut br#"{"0":new}"#.to_vec()),
Err(Error::new(5, 'n', ErrorType::ExpectedNull))
);
}
Expand Down

0 comments on commit 1a52464

Please sign in to comment.