From cb55a7fe54d58ad346a1f1fd441b9feb5ffa562b Mon Sep 17 00:00:00 2001 From: Zixuan Chen Date: Mon, 11 Mar 2024 02:49:02 +0800 Subject: [PATCH] test: test scan exclusive start on sstable (#56) --- mini-lsm/src/tests/week1_day5.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/mini-lsm/src/tests/week1_day5.rs b/mini-lsm/src/tests/week1_day5.rs index 93706c2..0eaf3e0 100644 --- a/mini-lsm/src/tests/week1_day5.rs +++ b/mini-lsm/src/tests/week1_day5.rs @@ -187,6 +187,21 @@ fn test_task2_storage_scan() { .unwrap(), vec![(Bytes::from("2"), Bytes::from("2333"))], ); + check_lsm_iter_result_by_key( + &mut storage + .scan(Bound::Included(b"0"), Bound::Included(b"1")) + .unwrap(), + vec![ + (Bytes::from_static(b"0"), Bytes::from_static(b"2333333")), + (Bytes::from("00"), Bytes::from("2333")), + ], + ); + check_lsm_iter_result_by_key( + &mut storage + .scan(Bound::Excluded(b"0"), Bound::Included(b"1")) + .unwrap(), + vec![(Bytes::from("00"), Bytes::from("2333"))], + ); } #[test]