diff --git a/snix/glue/src/tests/mod.rs b/snix/glue/src/tests/mod.rs index 2fe6fbf42..28f6afffa 100644 --- a/snix/glue/src/tests/mod.rs +++ b/snix/glue/src/tests/mod.rs @@ -69,10 +69,17 @@ fn eval_test(code_path: PathBuf, expect_success: bool) { _ => !result.errors.is_empty(), }; if expect_success && failed { + let error_details = result + .errors + .iter() + .map(|error| error.fancy_format_str()) + .collect::>(); + let error_string = error_details.join("\n"); + panic!( - "{}: evaluation of eval-okay test should succeed, but failed with {:?}", + "{}: evaluation of eval-okay test should succeed, but failed with:\n{}", code_path.display(), - result.errors, + error_string, ); }