Skip to content

Commit

Permalink
Update test to ensure reset occurs after rewind
Browse files Browse the repository at this point in the history
  • Loading branch information
rlee287 authored and chris-laplante committed Sep 26, 2022
1 parent 997567d commit 14b5ef2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/state.rs
Expand Up @@ -622,8 +622,11 @@ mod tests {
let mut est = Estimator::new(now);
est.record(0, now);
est.record(1, now);
assert_eq!(est.len(), 1);
// Should not panic.
est.record(0, now);
// Assert that the state of the estimator reset on rewind
assert_eq!(est.len(), 0);

let pb = ProgressBar::hidden();
pb.set_length(10);
Expand Down

0 comments on commit 14b5ef2

Please sign in to comment.