(tests: &mut Tests, name: String, sources: Vec<String>)
| 62 | let reader = BufReader::new(file); |
| 63 | |
| 64 | fn add_test(tests: &mut Tests, name: String, sources: Vec<String>) -> io::Result<()> { |
| 65 | if sources.is_empty() { |
| 66 | Err(io::Error::new( |
| 67 | io::ErrorKind::InvalidData, |
| 68 | format!("Test case '{}' has no Source section", name), |
| 69 | )) |
| 70 | } else { |
| 71 | tests.push(Test { name, sources }); |
| 72 | Ok(()) |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | fn finish_source(sources: &mut Vec<String>, source: &mut Option<String>) { |
| 77 | if let Some(source) = source.take() { |
no test coverage detected