test: test scan exclusive start on sstable (#56)

This commit is contained in:
Zixuan Chen
2024-03-11 02:49:02 +08:00
committed by GitHub
parent 2f1131268e
commit cb55a7fe54

View File

@@ -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]