Skip to content

Commit

Permalink
[test]: Modify test_sst_build_all() to add checks for first_key and l…
Browse files Browse the repository at this point in the history
…ast_key of SST (#76)

Signed-off-by: Alex Chi <[email protected]>
Co-authored-by: shenjiaqi.2769 <[email protected]>
Co-authored-by: Alex Chi <[email protected]>
  • Loading branch information
3 people authored May 25, 2024
1 parent daa4fde commit 2ba461b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mini-lsm/src/tests/week1_day4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ fn generate_sst() -> (TempDir, SsTable) {

#[test]
fn test_sst_build_all() {
generate_sst();
let (_, sst) = generate_sst();
assert_eq!(sst.first_key().as_key_slice(), key_of(0).as_key_slice());
assert_eq!(
sst.last_key().as_key_slice(),
key_of(num_of_keys() - 1).as_key_slice()
)
}

#[test]
Expand Down

0 comments on commit 2ba461b

Please sign in to comment.