1
Fork 0

Accumulate intermediate expressions into CoverageCounters

This avoids the need to pass around a separate vector to accumulate into, and
avoids the need to create a fake empty vector when failure occurs.
This commit is contained in:
Zalathar 2023-06-29 14:25:28 +10:00
parent c74db79c3b
commit 5302c9d451
3 changed files with 63 additions and 95 deletions

View file

@ -676,10 +676,10 @@ fn test_make_bcb_counters() {
}
}
let mut coverage_counters = counters::CoverageCounters::new(0);
let intermediate_expressions = coverage_counters
let () = coverage_counters
.make_bcb_counters(&mut basic_coverage_blocks, &coverage_spans)
.expect("should be Ok");
assert_eq!(intermediate_expressions.len(), 0);
assert_eq!(coverage_counters.intermediate_expressions.len(), 0);
let_bcb!(1);
assert_eq!(