make pretty source comparison check be fatal (fixes #52255)

This commit is contained in:
Tinco Andringa 2018-07-11 15:21:14 +02:00
parent ce45cbb053
commit f0b1a781ac

View file

@ -519,9 +519,8 @@ impl<'test> TestCx<'test> {
fn compare_source(&self, expected: &str, actual: &str) { fn compare_source(&self, expected: &str, actual: &str) {
if expected != actual { if expected != actual {
self.error("pretty-printed source does not match expected source"); self.fatal(&format!(
println!( "pretty-printed source does not match expected source\n\
"\n\
expected:\n\ expected:\n\
------------------------------------------\n\ ------------------------------------------\n\
{}\n\ {}\n\
@ -531,7 +530,7 @@ impl<'test> TestCx<'test> {
{}\n\ {}\n\
------------------------------------------\n\ ------------------------------------------\n\
\n", \n",
expected, actual expected, actual)
); );
} }
} }