Skip to content

Commit

Permalink
Test issues input with both str/iter variants.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethiraric committed Oct 19, 2024
1 parent ccf6394 commit e052a63
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions parser/tests/issues.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ use saphyr_parser::{Event, Parser, ScanError, TScalarStyle};
/// input traits.
fn run_parser(input: &str) -> Result<Vec<Event>, ScanError> {
let mut str_events = vec![];
// let mut iter_events = vec![];
let mut iter_events = vec![];

for x in Parser::new_from_str(input) {
str_events.push(x?.0);
}
// for x in Parser::new_from_iter(input.chars()) {
// iter_events.push(x?.0);
// }
//
// assert_eq!(str_events, iter_events);
for x in Parser::new_from_iter(input.chars()) {
iter_events.push(x?.0);
}

assert_eq!(str_events, iter_events);

Ok(str_events)
}
Expand Down

0 comments on commit e052a63

Please sign in to comment.