File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
compiler/test/dotty/tools/dotc/coverage Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import scala.jdk.CollectionConverters.*
1515import scala .util .Properties .userDir
1616import scala .language .unsafeNulls
1717import scala .collection .mutable .Buffer
18+ import dotty .tools .dotc .util .DiffUtil
1819
1920@ Category (Array (classOf [BootstrappedOnlyTests ]))
2021class CoverageTests :
@@ -56,12 +57,8 @@ class CoverageTests:
5657 val expected = fixWindowsPaths(Files .readAllLines(expectFile).asScala)
5758 val obtained = fixWindowsPaths(Files .readAllLines(targetFile).asScala)
5859 if expected != obtained then
59- // FIXME: zip will drop part of the output if one is shorter (i.e. will not print anything of one is a refix of the other)
60- for ((exp, actual),i) <- expected.zip(obtained).filter(_ != _).zipWithIndex do
61- Console .err.println(s " wrong line ${i+ 1 }: " )
62- Console .err.println(s " expected: $exp" )
63- Console .err.println(s " actual : $actual" )
64- fail(s " $targetFile differs from expected $expectFile" )
60+ val instructions = FileDiff .diffMessage(expectFile.toString, targetFile.toString)
61+ fail(s " Coverage report differs from expected data. \n $instructions" )
6562
6663 })
6764
You can’t perform that action at this time.
0 commit comments