(path: &str, source: &str)
| 2 | use atomic_semantic::ParserRegistry; |
| 3 | |
| 4 | fn rules(path: &str, source: &str) -> Vec<Rule> { |
| 5 | let inspection = inspect(&mut ParserRegistry::new(), path, source).unwrap(); |
| 6 | assert!( |
| 7 | !inspection.has_syntax_errors, |
| 8 | "fixture must parse: {source}" |
| 9 | ); |
| 10 | inspection |
| 11 | .issues |
| 12 | .into_iter() |
| 13 | .map(|issue| issue.rule) |
| 14 | .collect() |
| 15 | } |
| 16 | |
| 17 | fn long_function(branches: usize, lines: usize) -> String { |
| 18 | let mut source = String::from("fn large(x:i32) {\n"); |
no test coverage detected