Skip to content

Commit c9c08c8

Browse files
committed
Test iter_from/iter_dup_from with nonexistent keys
1 parent a520010 commit c9c08c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/cursor.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,8 @@ mod test {
420420

421421
assert_eq!(items.clone().into_iter().skip(1).collect::<Vec<_>>(),
422422
cursor.iter_from(b"key2").unwrap().collect::<Vec<_>>());
423+
424+
assert!(cursor.iter_from(b"foo"), Err(Error::NotFound));
423425
}
424426

425427
#[test]
@@ -466,6 +468,7 @@ mod test {
466468
assert_eq!(items.clone().into_iter().skip(3).take(3).collect::<Vec<(&[u8], &[u8])>>(),
467469
cursor.iter_dup_of(b"b").unwrap().collect::<Vec<_>>());
468470

471+
assert!(cursor.iter_dup_from(b"foo").is_err());
469472
assert!(cursor.iter_dup_of(b"foo").is_err());
470473
}
471474

0 commit comments

Comments
 (0)