Skip to content

Commit

Permalink
chore: adjust tests for 2.13.13
Browse files Browse the repository at this point in the history
  • Loading branch information
kasiaMarek committed Sep 12, 2023
1 parent 1c1f322 commit 4742b06
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 23 deletions.
20 changes: 8 additions & 12 deletions tests/cross/src/test/scala/tests/pc/CompletionDocSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -572,32 +572,28 @@ class CompletionDocSuite extends BaseCompletionSuite {
| section on `StringBuilders` for more information.
|StringBuilder scala.collection.mutable
|""".stripMargin,
scala3PresentationCompilerVersion ->
">=2.13.11" ->
s"""|$scala213Docs
|StringBuilder scala.collection.mutable
|""".stripMargin,
">=3.0.0" ->
List(
"StringBuilder scala.collection.mutable",
"StringBuilder(): StringBuilder",
"StringBuilder(str: String): StringBuilder",
"StringBuilder(underlying: java.lang.StringBuilder): StringBuilder",
"StringBuilder(underlying: StringBuilder): StringBuilder",
"StringBuilder(capacity: Int): StringBuilder",
"StringBuilder(initCapacity: Int, initValue: String): StringBuilder",
).map(s => scala213Docs + "\n" + s).mkString("\n"),
"3" ->
scala3PresentationCompilerVersion ->
List(
"StringBuilder scala.collection.mutable",
"StringBuilder(): StringBuilder",
"StringBuilder(str: String): StringBuilder",
"StringBuilder(underlying: StringBuilder): StringBuilder",
"StringBuilder(underlying: java.lang.StringBuilder): StringBuilder",
"StringBuilder(capacity: Int): StringBuilder",
"StringBuilder(initCapacity: Int, initValue: String): StringBuilder",
).map(s => scala213Docs + "\n" + s).mkString("\n"),
"2.13.11" ->
s"""|$scala213Docs
|StringBuilder scala.collection.mutable
|""".stripMargin,
"2.13.12" ->
s"""|$scala213Docs
|StringBuilder scala.collection.mutable
|""".stripMargin,
),
)

Expand Down
11 changes: 2 additions & 9 deletions tests/cross/src/test/scala/tests/pc/CompletionSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1274,21 +1274,14 @@ class CompletionSuite extends BaseCompletionSuite {
topLines = Some(5),
compat = Map(
// higherKinds was deprecated in 2.13.11 but current dotty still depends on 2.13.10
"2.13.11" ->
">=2.13.11" ->
"""|dynamics scala.languageFeature
|existentials scala.languageFeature
|experimental scala.languageFeature
|implicitConversions scala.languageFeature
|postfixOps scala.languageFeature
|""".stripMargin,
"2.13.12" ->
"""|dynamics scala.languageFeature
|existentials scala.languageFeature
|experimental scala.languageFeature
|implicitConversions scala.languageFeature
|postfixOps scala.languageFeature
|""".stripMargin,
scala3PresentationCompilerVersion ->
">=3.0.0" ->
"""|dynamics scala.languageFeature
|existentials scala.languageFeature
|experimental scala.languageFeature
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package tests.pc

import scala.meta.internal.mtags.BuildInfo
import scala.meta.internal.semver.SemVer.Version.{fromString => ver}

import tests.BaseSignatureHelpSuite

Expand Down Expand Up @@ -95,8 +96,11 @@ class SignatureHelpDocSuite extends BaseSignatureHelpSuite {
),
)

val addedSpace: String =
if (Set("2.13.11", "2.13.12")(BuildInfo.scalaCompilerVersion)) "" else " "
val addedSpace: String = {
val parsed = ver(BuildInfo.scalaCompilerVersion)
if (parsed >= ver("2.13.11") && parsed < ver("3.0.0")) "" else " "
}

checkDoc(
"curry3",
"""
Expand Down

0 comments on commit 4742b06

Please sign in to comment.