-
Notifications
You must be signed in to change notification settings - Fork 133
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 #2837 from Gedochao/maintenance/bloop-fatal-invari…
…ant-fix Bump `bloop-core` to 1.5.16-sc-2
- Loading branch information
Showing
13 changed files
with
239 additions
and
279 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
2 changes: 1 addition & 1 deletion
2
modules/integration/src/test/scala/scala/cli/integration/BspTests212.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,3 +1,3 @@ | ||
package scala.cli.integration | ||
|
||
class BspTests212 extends BspTestDefinitions with Test212 | ||
class BspTests212 extends BspTestDefinitions with BspTests2Definitions with Test212 |
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
31 changes: 31 additions & 0 deletions
31
modules/integration/src/test/scala/scala/cli/integration/BspTests2Definitions.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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package scala.cli.integration | ||
|
||
import scala.concurrent.ExecutionContext.Implicits.global | ||
|
||
trait BspTests2Definitions { _: BspTestDefinitions => | ||
for { | ||
useDirectives <- Seq(true, false) | ||
(directive, options) <- Seq( | ||
(s"//> using scala $actualScalaVersion", Seq("--scala", actualScalaVersion)) | ||
) | ||
extraOptionsOverride = | ||
if (useDirectives) TestUtil.extraOptions else TestUtil.extraOptions ++ options | ||
testNameSuffix = if (useDirectives) directive else options.mkString(" ") | ||
} test(s"BSP App object wrapper forced with $testNameSuffix") { | ||
val (script1, script2) = "script1.sc" -> "script2.sc" | ||
val directiveString = if (useDirectives) directive else "" | ||
val inputs = TestInputs( | ||
os.rel / script1 -> | ||
s"""//> using platform js | ||
|$directiveString | ||
| | ||
|def main(args: String*): Unit = println("Hello") | ||
|main() | ||
|""".stripMargin, | ||
os.rel / script2 -> | ||
"""println("Hello") | ||
|""".stripMargin | ||
) | ||
testScriptWrappers(inputs, extraOptionsOverride = extraOptionsOverride)(expectAppWrapper) | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
modules/integration/src/test/scala/scala/cli/integration/BspTests3Definitions.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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package scala.cli.integration | ||
|
||
import scala.concurrent.ExecutionContext.Implicits.global | ||
|
||
trait BspTests3Definitions { _: BspTestDefinitions => | ||
test("BSP class wrapper for Scala 3") { | ||
val (script1, script2) = "script1.sc" -> "script2.sc" | ||
val inputs = TestInputs( | ||
os.rel / script1 -> | ||
s"""def main(args: String*): Unit = println("Hello") | ||
|main() | ||
|""".stripMargin, | ||
os.rel / script2 -> | ||
s"""//> using dep "org.scalatest::scalatest:3.2.15" | ||
| | ||
|import org.scalatest.*, flatspec.*, matchers.* | ||
| | ||
|class PiTest extends AnyFlatSpec with should.Matchers { | ||
| "pi calculus" should "return a precise enough pi value" in { | ||
| math.Pi shouldBe 3.14158d +- 0.001d | ||
| } | ||
|} | ||
|org.scalatest.tools.Runner.main(Array("-oDF", "-s", classOf[PiTest].getName))""".stripMargin | ||
) | ||
testScriptWrappers(inputs)(expectClassWrapper) | ||
} | ||
|
||
for { | ||
useDirectives <- Seq(true, false) | ||
(directive, options) <- Seq( | ||
("//> using object.wrapper", Seq("--object-wrapper")), | ||
("//> using platform js", Seq("--js")) | ||
) | ||
wrapperOptions = if (useDirectives) Nil else options | ||
testNameSuffix = if (useDirectives) directive else options.mkString(" ") | ||
} test(s"BSP object wrapper forced with $testNameSuffix") { | ||
val (script1, script2) = "script1.sc" -> "script2.sc" | ||
val directiveString = if (useDirectives) directive else "" | ||
val inputs = TestInputs( | ||
os.rel / script1 -> | ||
s"""$directiveString | ||
| | ||
|def main(args: String*): Unit = println("Hello") | ||
|main() | ||
|""".stripMargin, | ||
os.rel / script2 -> | ||
"""println("Hello") | ||
|""".stripMargin | ||
) | ||
testScriptWrappers(inputs, bspOptions = wrapperOptions)(expectObjectWrapper) | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
modules/integration/src/test/scala/scala/cli/integration/BspTests3Lts.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,3 +1,3 @@ | ||
package scala.cli.integration | ||
|
||
class BspTests3Lts extends BspTestDefinitions with Test3Lts | ||
class BspTests3Lts extends BspTestDefinitions with BspTests3Definitions with Test3Lts |
2 changes: 1 addition & 1 deletion
2
modules/integration/src/test/scala/scala/cli/integration/BspTests3NextRc.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,3 +1,3 @@ | ||
package scala.cli.integration | ||
|
||
class BspTests3NextRc extends BspTestDefinitions with Test3NextRc | ||
class BspTests3NextRc extends BspTestDefinitions with BspTests3Definitions with Test3NextRc |
2 changes: 1 addition & 1 deletion
2
modules/integration/src/test/scala/scala/cli/integration/BspTestsDefault.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,3 +1,3 @@ | ||
package scala.cli.integration | ||
|
||
class BspTestsDefault extends BspTestDefinitions with TestDefault | ||
class BspTestsDefault extends BspTestDefinitions with BspTests3Definitions with TestDefault |
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.