Skip to content

Commit 6e1bba5

Browse files
committed
print what is the diff
1 parent 923f63f commit 6e1bba5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler/src/dotty/tools/dotc/transform/Pickler.scala

+4-3
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,10 @@ class Pickler extends Phase {
307307
private def testSamePrinted(printed: String, checkContents: String, cls: ClassSymbol, check: AbstractFile)(using Context): Unit = {
308308
if hasDiff(printed, checkContents) then
309309
output("after-printing.txt", printed)
310-
report.error(em"""TASTy printer difference for $cls in ${cls.source}, for details:
311-
|
312-
| diff ${check.toString} after-printing.txt""")
310+
report.error(em"""TASTy printer difference for $cls in ${cls.source}, did not match ${check},
311+
| output dumped in after-printing.txt, check diff with `git diff --no-index -- after-printing.txt ${check}`
312+
| actual output:
313+
|$printed""")
313314
}
314315

315316
/** Reuse diff logic from compiler/test/dotty/tools/vulpix/FileDiff.scala */

0 commit comments

Comments
 (0)