File tree 1 file changed +3
-6
lines changed
compiler/test/dotty/tools/dotc/coverage
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.*
15
15
import scala .util .Properties .userDir
16
16
import scala .language .unsafeNulls
17
17
import scala .collection .mutable .Buffer
18
+ import dotty .tools .dotc .util .DiffUtil
18
19
19
20
@ Category (Array (classOf [BootstrappedOnlyTests ]))
20
21
class CoverageTests :
@@ -56,12 +57,8 @@ class CoverageTests:
56
57
val expected = fixWindowsPaths(Files .readAllLines(expectFile).asScala)
57
58
val obtained = fixWindowsPaths(Files .readAllLines(targetFile).asScala)
58
59
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" )
65
62
66
63
})
67
64
You can’t perform that action at this time.
0 commit comments