Skip to main content

subtr_actor/ballchasing/
report.rs

1pub struct BallchasingComparisonReport {
2    pub(super) mismatches: Vec<String>,
3}
4
5impl BallchasingComparisonReport {
6    pub fn is_match(&self) -> bool {
7        self.mismatches.is_empty()
8    }
9
10    pub fn mismatches(&self) -> &[String] {
11        &self.mismatches
12    }
13
14    pub fn assert_matches(&self) {
15        if self.is_match() {
16            return;
17        }
18
19        panic!(
20            "Ballchasing comparison failed:\n{}",
21            self.mismatches.join("\n")
22        );
23    }
24}