()
| 190 | |
| 191 | #[test] |
| 192 | fn test_contiguous_eager_emission() { |
| 193 | use crate::{SourceOffset, Token}; |
| 194 | let bump = Bump::default(); |
| 195 | let mut output = BumpVec::new_in(&bump); |
| 196 | { |
| 197 | let mut ordered_sink = CursorOrderedSink::new(&bump, &mut output); |
| 198 | // Create cursors that form a contiguous sequence |
| 199 | let cursor_at_0 = Cursor::new(SourceOffset(0), Token::SPACE); |
| 200 | let cursor_at_1 = Cursor::new(SourceOffset(1), Token::SPACE); |
| 201 | ordered_sink.append(cursor_at_0); |
| 202 | ordered_sink.append(cursor_at_1); |
| 203 | // Avoid flushing as they should be emitted immediately |
| 204 | } |
| 205 | assert_eq!(output.len(), 2); |
| 206 | assert_eq!(output[0].span().start(), SourceOffset(0)); |
| 207 | assert_eq!(output[1].span().start(), SourceOffset(1)); |
| 208 | } |
| 209 | |
| 210 | #[test] |
| 211 | fn test_gap_filling() { |
nothing calls this directly
no test coverage detected