(before: &[(String, Vec<u8>)], after: &[(String, Vec<u8>)])
| 76 | } |
| 77 | |
| 78 | fn bytes_differ(before: &[(String, Vec<u8>)], after: &[(String, Vec<u8>)]) -> Vec<String> { |
| 79 | let mut differences = Vec::new(); |
| 80 | for (path, bytes) in before { |
| 81 | match after.iter().find(|(other, _)| other == path) { |
| 82 | None => differences.push(format!("{path} removed")), |
| 83 | Some((_, other)) if other != bytes => differences.push(format!("{path} changed")), |
| 84 | Some(_) => {} |
| 85 | } |
| 86 | } |
| 87 | for (path, _) in after { |
| 88 | if !before.iter().any(|(other, _)| other == path) { |
| 89 | differences.push(format!("{path} added")); |
| 90 | } |
| 91 | } |
| 92 | differences |
| 93 | } |
| 94 | |
| 95 | #[test] |
| 96 | fn census_reports_classes_read_only_and_clean_state_passes() { |
no test coverage detected