Skip to content

Commit

Permalink
Clean output
Browse files Browse the repository at this point in the history
  • Loading branch information
ritiek committed Jan 4, 2018
1 parent 687d3d1 commit 45c2c9a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2708,15 +2708,16 @@ impl<'test> TestCx<'test> {
return 0;
}

println!("normalized {}:\n{}\n", kind, actual);
println!("expected {}:\n{}\n", kind, expected);
println!("diff of {}:\n", kind);

for diff in diff::lines(expected, actual) {
match diff {
diff::Result::Left(l) => println!("-{}", l),
diff::Result::Both(l, _) => println!(" {}", l),
diff::Result::Right(r) => println!("+{}", r),
if expected.is_empty() {
println!("normalized {}:\n{}\n", kind, actual);
} else {
println!("diff of {}:\n", kind);
for diff in diff::lines(expected, actual) {
match diff {
diff::Result::Left(l) => println!("-{}", l),
diff::Result::Right(r) => println!("+{}", r),
_ => {},
}
}
}

Expand Down

0 comments on commit 45c2c9a

Please sign in to comment.