Test iter_from/iter_dup_from with nonexistent keys

without.crypto
Tony Arcieri 8 years ago
parent a5200104dc
commit 53fd6afdb6
  1. 3
      src/cursor.rs

@ -420,6 +420,8 @@ mod test {
assert_eq!(items.clone().into_iter().skip(1).collect::<Vec<_>>(), assert_eq!(items.clone().into_iter().skip(1).collect::<Vec<_>>(),
cursor.iter_from(b"key2").unwrap().collect::<Vec<_>>()); cursor.iter_from(b"key2").unwrap().collect::<Vec<_>>());
assert!(cursor.iter_from(b"foo").is_err());
} }
#[test] #[test]
@ -466,6 +468,7 @@ mod test {
assert_eq!(items.clone().into_iter().skip(3).take(3).collect::<Vec<(&[u8], &[u8])>>(), assert_eq!(items.clone().into_iter().skip(3).take(3).collect::<Vec<(&[u8], &[u8])>>(),
cursor.iter_dup_of(b"b").unwrap().collect::<Vec<_>>()); cursor.iter_dup_of(b"b").unwrap().collect::<Vec<_>>());
assert!(cursor.iter_dup_from(b"foo").is_err());
assert!(cursor.iter_dup_of(b"foo").is_err()); assert!(cursor.iter_dup_of(b"foo").is_err());
} }

Loading…
Cancel
Save