()
| 147 | |
| 148 | #[test] |
| 149 | fn test_basic() { |
| 150 | let source_text = "foo bar"; |
| 151 | let bump = Bump::default(); |
| 152 | let mut output = BumpVec::new_in(&bump); |
| 153 | { |
| 154 | let mut ordered_sink = CursorOrderedSink::new(&bump, &mut output); |
| 155 | let lexer = Lexer::new(&EmptyAtomSet::ATOMS, source_text); |
| 156 | let mut parser = Parser::new(&bump, source_text, lexer); |
| 157 | parser.parse_entirely::<ComponentValues>().output.unwrap().to_cursors(&mut ordered_sink); |
| 158 | ordered_sink.flush(); |
| 159 | } |
| 160 | let mut result = String::new(); |
| 161 | for c in output.iter() { |
| 162 | write!(&mut result, "{}", SourceCursor::from(*c, c.str_slice(source_text))).unwrap(); |
| 163 | } |
| 164 | assert_eq!(result, "foo bar"); |
| 165 | } |
| 166 | |
| 167 | #[test] |
| 168 | fn test_manual_flush() { |
nothing calls this directly
no test coverage detected