-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3006 from adpi2/sbt-server-tests-2
Alternative version of #2999: Add more tests on using sbt as the build server
- Loading branch information
Showing
88 changed files
with
2,001 additions
and
1,638 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 9 additions & 108 deletions
117
tests/slow/src/test/scala/tests/feature/CrossDebugSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,110 +1,11 @@ | ||
package tests.feature | ||
|
||
import scala.meta.internal.metals.{BuildInfo => V} | ||
|
||
import tests.BaseDapSuite | ||
|
||
class CrossDebugSuite extends BaseDapSuite("cross-debug") { | ||
|
||
override def scalaVersion: String = V.scala3 | ||
|
||
assertBreakpoints( | ||
"outer", | ||
main = Some("a.helloWorld") | ||
)( | ||
source = """|/a/src/main/scala/a/Main.scala | ||
|package a | ||
| | ||
|@main | ||
|def helloWorld(): Unit = { | ||
|>>println("Hello world") | ||
| System.exit(0) | ||
|} | ||
| | ||
|""".stripMargin | ||
) | ||
|
||
assertBreakpoints( | ||
"unapply", | ||
main = Some("a.helloWorld") | ||
)( | ||
source = """|/a/src/main/scala/a/Main.scala | ||
|package a | ||
| | ||
|@main | ||
|def helloWorld(): Unit = { | ||
| object Even { | ||
|>> def unapply(s: String): Boolean = s.size % 2 == 0 | ||
| } | ||
| | ||
| "even" match { | ||
| case Even() => | ||
| case _ => | ||
| } | ||
| System.exit(0) | ||
|} | ||
| | ||
|""".stripMargin | ||
) | ||
|
||
assertBreakpoints( | ||
"object-in-toplevel-method", | ||
main = Some("a.helloWorld") | ||
)( | ||
source = """|/a/src/main/scala/a/Main.scala | ||
|package a | ||
| | ||
|@main | ||
|def helloWorld(): Unit = { | ||
| object Hello{ | ||
| def run() = { | ||
|>> println("Hello world") | ||
| } | ||
| } | ||
| Hello.run() | ||
| System.exit(0) | ||
|} | ||
| | ||
| | ||
|""".stripMargin | ||
) | ||
|
||
assertBreakpoints( | ||
"optional-braces", | ||
main = Some("a.hello") | ||
)( | ||
source = """|/a/src/main/scala/a/Main.scala | ||
|package a | ||
| | ||
|@main | ||
|def hello(): Unit = | ||
| greet("Alice") | ||
| System.exit(0) | ||
| | ||
|def greet(name: String) = | ||
|>>val message = s"Hello, $name!" | ||
|>>println(message) | ||
| | ||
|""".stripMargin | ||
) | ||
|
||
assertBreakpoints( | ||
"optional-braces-main", | ||
main = Some("a.hello") | ||
)( | ||
source = """|/a/src/main/scala/a/Main.scala | ||
|package a | ||
| | ||
|@main | ||
|def hello(): Unit = | ||
|>>greet("Alice") | ||
|>>System.exit(0) | ||
| | ||
|def greet(name: String) = | ||
| val message = s"Hello, $name!" | ||
| println(message) | ||
| | ||
|""".stripMargin | ||
) | ||
|
||
} | ||
import tests.QuickBuildInitializer | ||
import tests.QuickBuildLayout | ||
|
||
class CrossDebugSuite | ||
extends BaseCrossDebugSuite( | ||
"cross-debug", | ||
QuickBuildInitializer, | ||
QuickBuildLayout | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.