Skip to content

Commit 2ba461b

Browse files
Gleiphir2769shenjiaqi.2769skyzh
authored
[test]: Modify test_sst_build_all() to add checks for first_key and last_key of SST (#76)
Signed-off-by: Alex Chi <iskyzh@gmail.com> Co-authored-by: shenjiaqi.2769 <shenjiaqi.2769@bytedance.com> Co-authored-by: Alex Chi <iskyzh@gmail.com>
1 parent daa4fde commit 2ba461b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mini-lsm/src/tests/week1_day4.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ fn generate_sst() -> (TempDir, SsTable) {
5555

5656
#[test]
5757
fn test_sst_build_all() {
58-
generate_sst();
58+
let (_, sst) = generate_sst();
59+
assert_eq!(sst.first_key().as_key_slice(), key_of(0).as_key_slice());
60+
assert_eq!(
61+
sst.last_key().as_key_slice(),
62+
key_of(num_of_keys() - 1).as_key_slice()
63+
)
5964
}
6065

6166
#[test]

0 commit comments

Comments
 (0)