You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert_ne!(count,0,"the baseline is never empty");
45
+
46
+
assert_ne!(test_count,0,"the baseline is never empty");
38
47
if failures.is_empty(){
39
48
todo!("The baseline is currently meddling with hooks, thats not needed anymore since the failure rate is 0: move this into a module of the normal tests");
40
49
}
50
+
51
+
let failure_count = failures.len();
52
+
let passed_count = test_count - failure_count;
53
+
let expected_failure_count = baseline::Kind::new().max_num_failures();
eprintln!("the number of failing tests is as expected");
66
+
}
67
+
Ordering::Less => {
68
+
panic!(
69
+
"{} more passing tests than expected. Great work! Please change the expected number of failures to {failure_count} to make this panic go away",
70
+
expected_failure_count - failure_count,
71
+
)
72
+
}
73
+
Ordering::Greater => {
74
+
panic!(
75
+
"{} more failing tests than expected! This should get better, not worse. Please check your changes manually for any regressions",
76
+
failure_count - expected_failure_count,
77
+
)
78
+
}
43
79
}
44
-
eprintln!(
45
-
"{} failed out of {count} tests ({} passed)",
46
-
failures.len(),
47
-
count - failures.len()
48
-
);
49
-
assert!(
50
-
serialized_url_does_not_match_input <= 126,
51
-
"we shouldn't get worse when serializing to match our input URL"
52
-
);
53
80
54
-
let kind = baseline::Kind::new();
55
-
assert_eq!(failed_roundtrips,0);
56
81
assert!(
57
-
failures.len() <= kind.max_num_failures(),
58
-
"Expected no more than {} failures, but got {} - this should get better, not worse",
59
-
kind.max_num_failures(),
60
-
failures.len(),
61
-
)
82
+
failure_count_reserialization <= 42,
83
+
"the number of reserialization errors should ideally get better, not worse - if this panic is not due to regressions but to new passing test cases, you can set this check to {failure_count_reserialization}"
84
+
);
85
+
assert_eq!(failure_count_roundtrips,0,"there should be no roundtrip errors");
0 commit comments