Create a RollingBuffer with fixed dimensions for deterministic test output.
(title: &str, term_width: usize, max_lines: usize)
| 2 | |
| 3 | /// Create a RollingBuffer with fixed dimensions for deterministic test output. |
| 4 | fn make_test_buffer(title: &str, term_width: usize, max_lines: usize) -> RollingBuffer { |
| 5 | RollingBuffer { |
| 6 | lines: VecDeque::with_capacity(max_lines), |
| 7 | max_lines, |
| 8 | total_lines: 0, |
| 9 | rendered_count: 0, |
| 10 | term: Term::stderr(), |
| 11 | term_width, |
| 12 | active: true, |
| 13 | title: title.to_string(), |
| 14 | start: Instant::now(), |
| 15 | finished: false, |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | /// Strip ANSI codes and join frame lines for readable snapshots. |
| 20 | fn render_stripped(rb: &RollingBuffer) -> String { |
no outgoing calls
no test coverage detected