mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 05:48:31 +00:00
Improve error messages for ef_tests
This commit is contained in:
@@ -13,10 +13,10 @@ pub struct CaseResult {
|
||||
}
|
||||
|
||||
impl CaseResult {
|
||||
pub fn new<T: Debug>(case_index: usize, case: &T, result: Result<(), Error>) -> Self {
|
||||
pub fn new(case_index: usize, case: &impl Case, result: Result<(), Error>) -> Self {
|
||||
CaseResult {
|
||||
case_index,
|
||||
desc: format!("{:?}", case),
|
||||
desc: case.description(),
|
||||
result,
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@ where
|
||||
|
||||
if !mismatching_fields.is_empty() {
|
||||
Err(Error::NotEqual(format!(
|
||||
"Fields not equal: {:#?}",
|
||||
"Fields not equal (a = expected, b = result): {:#?}",
|
||||
mismatching_fields
|
||||
)))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user