Skip to content

Commit

Permalink
Add test to assure memory consumption of EntryData doesn't change une…
Browse files Browse the repository at this point in the history
…xpectedly.
  • Loading branch information
Byron committed Nov 24, 2023
1 parent bb41fd5 commit adebd00
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/traverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,17 @@ impl Traversal {
.sum()
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn size_of_entry_data() {
assert_eq!(
std::mem::size_of::<EntryData>(),
if cfg!(windows) { 56 } else { 48 },
"the size of this should not change unexpectedly as it affects overall memory consumption"
);
}
}

0 comments on commit adebd00

Please sign in to comment.