From 126aa4cd6c1a6c8d06861ecb9181e61b1775ca94 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Sun, 10 Jul 2016 16:01:36 -0700 Subject: [PATCH] Test iter_from/iter_dup_from with nonexistent keys --- src/cursor.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cursor.rs b/src/cursor.rs index c634791..61058bd 100644 --- a/src/cursor.rs +++ b/src/cursor.rs @@ -446,6 +446,8 @@ mod test { assert_eq!(items.clone().into_iter().skip(1).collect::>(), cursor.iter_from(b"key2").unwrap().collect::>()); + + assert!(cursor.iter_from(b"foo").is_err()); } #[test] @@ -492,6 +494,7 @@ mod test { assert_eq!(items.clone().into_iter().skip(3).take(3).collect::>(), cursor.iter_dup_of(b"b").unwrap().collect::>()); + assert!(cursor.iter_dup_from(b"foo").is_err()); assert!(cursor.iter_dup_of(b"foo").is_err()); }