From 9f405ae0a9950e493636b6f4af587d10b8e7342c Mon Sep 17 00:00:00 2001 From: Hamza REMMAL Date: Fri, 24 May 2024 12:27:09 +0200 Subject: [PATCH] try to debug semanticdb --- .../test/dotty/tools/dotc/semanticdb/SemanticdbTests.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/test/dotty/tools/dotc/semanticdb/SemanticdbTests.scala b/compiler/test/dotty/tools/dotc/semanticdb/SemanticdbTests.scala index 4db047d0951e..be66cf60880f 100644 --- a/compiler/test/dotty/tools/dotc/semanticdb/SemanticdbTests.scala +++ b/compiler/test/dotty/tools/dotc/semanticdb/SemanticdbTests.scala @@ -22,7 +22,7 @@ import org.junit.experimental.categories.Category import dotty.BootstrappedOnlyTests import dotty.tools.dotc.Main import dotty.tools.dotc.semanticdb.Scala3.given -import dotty.tools.dotc.util.SourceFile +import dotty.tools.dotc.util.{SourceFile, DiffUtil} @main def updateExpect = SemanticdbTests().runExpectTest(updateExpectFiles = true) @@ -77,6 +77,7 @@ class SemanticdbTests: val expectName = expectPath.getFileName val relExpect = rootSrc.relativize(expectPath) if expected.trim != obtained.trim then + println(DiffUtil.mkColoredLineDiff(obtained.trim().linesIterator.toSeq, expected.trim().linesIterator.toSeq)) Files.write(expectPath.resolveSibling("" + expectName + ".out"), obtained.getBytes(StandardCharsets.UTF_8)) errors += expectPath for source <- inputFiles().sorted do