Skip to content

Commit

Permalink
Modify assertions to something less cumbersome
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Aug 29, 2024
1 parent 62e1ceb commit 01c4985
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/engine/strat_engine/backstore/blockdevmgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,17 +636,15 @@ mod tests {
)
.unwrap();
assert_eq!(
mgr.sizer().avail_space().sectors() + mgr.sizer().metadata_size().sectors(),
mgr.sizer().size().sectors()
mgr.sizer().avail_space().sectors(),
mgr.sizer().usable_size().sectors()
);

let allocated = Sectors(2);
mgr.alloc(&[allocated]).unwrap();
assert_eq!(
mgr.sizer().avail_space().sectors()
+ allocated
+ mgr.sizer().metadata_size().sectors(),
mgr.sizer().size().sectors()
mgr.sizer().avail_space().sectors() + allocated,
mgr.sizer().usable_size().sectors()
);
}

Expand Down Expand Up @@ -859,17 +857,15 @@ mod tests {
)
.unwrap();
assert_eq!(
mgr.sizer().avail_space().sectors() + mgr.sizer().metadata_size().sectors(),
mgr.sizer().size().sectors()
mgr.sizer().avail_space().sectors(),
mgr.sizer().usable_size().sectors()
);

let allocated = Sectors(2);
mgr.alloc(&[allocated]).unwrap();
assert_eq!(
mgr.sizer().avail_space().sectors()
+ allocated
+ mgr.sizer().metadata_size().sectors(),
mgr.sizer().size().sectors()
mgr.sizer().avail_space().sectors() + allocated,
mgr.sizer().usable_size().sectors()
);
}

Expand Down

0 comments on commit 01c4985

Please sign in to comment.