Skip to content

Commit

Permalink
test: test scan exclusive start on sstable (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxch3n authored Mar 10, 2024
1 parent 2f11312 commit cb55a7f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mini-lsm/src/tests/week1_day5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit cb55a7f

Please sign in to comment.