Skip to content

Commit bfd4b53

Browse files
authored
Merge pull request #14692 from adpi2/debugger
Add Playground to make debugging easier in Metals
2 parents 5fcfeec + 9b710ff commit bfd4b53

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package dotty.tools.dotc
2+
3+
import dotty.tools.vulpix._
4+
import org.junit.Test
5+
import org.junit.Ignore
6+
7+
@Ignore class Playground:
8+
import TestConfiguration._
9+
import CompilationTests._
10+
11+
@Test def example: Unit =
12+
implicit val testGroup: TestGroup = TestGroup("playground")
13+
compileFile("tests/playground/example.scala", defaultOptions).checkCompile()

compiler/test/dotty/tools/dotc/SettingsTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class SettingsTests {
106106
false
107107

108108
val default = Settings.defaultState
109-
assertThrows[IllegalArgumentException](checkMessage("found: not an option of type java.lang.String, required: Boolean")) {
109+
dotty.tools.assertThrows[IllegalArgumentException](checkMessage("found: not an option of type java.lang.String, required: Boolean")) {
110110
Settings.option.updateIn(default, "not an option")
111111
}
112112

project/Build.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ object Build {
251251
// Prevent sbt from rewriting our dependencies
252252
scalaModuleInfo ~= (_.map(_.withOverrideScalaVersion(false))),
253253

254-
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
254+
libraryDependencies += "com.github.sbt" % "junit-interface" % "0.13.3" % Test,
255255

256256
// If someone puts a source file at the root (e.g., for manual testing),
257257
// don't pick it up as part of any project.
@@ -1327,7 +1327,7 @@ object Build {
13271327
"org.jsoup" % "jsoup" % "1.14.3", // Needed to process .html files for static site
13281328
Dependencies.`jackson-dataformat-yaml`,
13291329

1330-
"com.novocode" % "junit-interface" % "0.11" % "test",
1330+
"com.github.sbt" % "junit-interface" % "0.13.3" % Test,
13311331
),
13321332
Compile / mainClass := Some("dotty.tools.scaladoc.Main"),
13331333
Compile / buildInfoKeys := Seq[BuildInfoKey](version),

tests/playground/example.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
object Test:
2+
val foo: Int = 2
3+
def bar(x: Int): Int = x + x
4+
bar(foo)

0 commit comments

Comments
 (0)