Skip to content

Commit

Permalink
test: remove unused compats
Browse files Browse the repository at this point in the history
  • Loading branch information
kasiaMarek committed Aug 21, 2024
1 parent be7db18 commit a10784f
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 655 deletions.
37 changes: 2 additions & 35 deletions tests/cross/src/test/scala/tests/pc/CompletionDocSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ class CompletionDocSuite extends BaseCompletionSuite {
|join(delimiter: CharSequence, elements: Iterable[_ <: CharSequence]): String
|""".stripMargin,
compat = Map(
scala3PresentationCompilerVersion ->
"""|join(delimiter: CharSequence, elements: CharSequence*): String
|join(delimiter: CharSequence, elements: java.lang.Iterable[? <: CharSequence]): String
|""".stripMargin,
"3" ->
"""|join(delimiter: CharSequence, elements: CharSequence*): String
|join(delimiter: CharSequence, elements: Iterable[? <: CharSequence]): String
Expand Down Expand Up @@ -633,15 +629,6 @@ class CompletionDocSuite extends BaseCompletionSuite {
"StringBuilder(underlying: StringBuilder): StringBuilder",
"StringBuilder(capacity: Int): StringBuilder",
"StringBuilder(initCapacity: Int, initValue: String): StringBuilder"
).map(s => scala213Docs + "\n" + s).mkString("\n"),
scala3PresentationCompilerVersion ->
List(
"StringBuilder scala.collection.mutable",
"StringBuilder(): StringBuilder",
"StringBuilder(str: String): StringBuilder",
"StringBuilder(underlying: java.lang.StringBuilder): StringBuilder",
"StringBuilder(capacity: Int): StringBuilder",
"StringBuilder(initCapacity: Int, initValue: String): StringBuilder"
).map(s => scala213Docs + "\n" + s).mkString("\n")
)
)
Expand Down Expand Up @@ -706,21 +693,7 @@ class CompletionDocSuite extends BaseCompletionSuite {
includeDocs = true,
compat = Map(
"2.13" -> vectorDocs213,
"3" -> vectorDocs213,
">=3.4.1-RC1-bin-20240208-hash-NIGHTLY" ->
(vectorDocs213 +
"""|> Creates a collection with the specified elements.
|
|**Type Parameters**
|- `A`: the type of the ${coll}'s elements
|
|**Parameters**
|- `elems`: the elements of the created collection
|
|**Returns:** a new collection with elements `elems`
|Vector[A](elems: A*): Vector[A]
|
|""".stripMargin)
"3" -> vectorDocs213
)
)

Expand Down Expand Up @@ -919,12 +892,6 @@ class CompletionDocSuite extends BaseCompletionSuite {
|}
""".stripMargin,
"""|myNumbers: Vector[Int]
|""".stripMargin,
compat = Map(
">=3.4.1-RC1-bin-20240208-hash-NIGHTLY" ->
"""|myNumbers: Vector[Int]
|myNumbers(i: Int): Int
|""".stripMargin
)
|""".stripMargin
)
}
12 changes: 0 additions & 12 deletions tests/cross/src/test/scala/tests/pc/CompletionIssueSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,6 @@ class CompletionIssueSuite extends BaseCompletionSuite {
"3" ->
"""|filter(p: A => Boolean): Array[A]
|filter(pred: A => Boolean): C
|""".stripMargin,
">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" ->
"""|filter(p: Int => Boolean): Array[Int]
|filter(pred: Int => Boolean): IndexedSeq[Int @uncheckedVariance]
|""".stripMargin
)
)
Expand All @@ -217,10 +213,6 @@ class CompletionIssueSuite extends BaseCompletionSuite {
"3" ->
"""|filter(p: A => Boolean): Array[A]
|filter(pred: A => Boolean): C
|""".stripMargin,
">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" ->
"""|filter(p: Int => Boolean): Array[Int]
|filter(pred: Int => Boolean): IndexedSeq[Int @uncheckedVariance]
|""".stripMargin
)
)
Expand All @@ -243,10 +235,6 @@ class CompletionIssueSuite extends BaseCompletionSuite {
"3" ->
"""|filter(p: A => Boolean): Array[A]
|filter(pred: A => Boolean): C
|""".stripMargin,
">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" ->
"""|filter(p: Int => Boolean): Array[Int]
|filter(pred: Int => Boolean): IndexedSeq[Int @uncheckedVariance]
|""".stripMargin
)
)
Expand Down
36 changes: 4 additions & 32 deletions tests/cross/src/test/scala/tests/pc/CompletionKeywordSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite {
compat = Map(
"3" -> """|transient scala (commit: '')
|transparentTrait(): transparentTrait (commit: '')
|transparentTrait - scala.annotation (commit: '')""".stripMargin,
"3.4" -> """|transient scala (commit: '')
|transparentTrait - scala.annotation (commit: '')
|""".stripMargin,
">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" ->
"""|transparentTrait - scala.annotation (commit: '')
|""".stripMargin,
">=3.4.2-RC1-bin-20240301-hash-NIGHTLY" -> ""
|transparentTrait - scala.annotation (commit: '')""".stripMargin
),
includeCommitCharacter = true
)
Expand All @@ -71,15 +64,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite {
compat = Map(
"3" -> """|transient scala (commit: '')
|transparentTrait(): transparentTrait (commit: '')
|transparentTrait - scala.annotation (commit: '')""".stripMargin,
"3.4" ->
"""|transient scala (commit: '')
|transparentTrait - scala.annotation (commit: '')
|""".stripMargin,
">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" ->
"""|transparentTrait - scala.annotation (commit: '')
|""".stripMargin,
">=3.4.2-RC1-bin-20240301-hash-NIGHTLY" -> ""
|transparentTrait - scala.annotation (commit: '')""".stripMargin
),
includeCommitCharacter = true
)
Expand Down Expand Up @@ -485,13 +470,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite {
|deprecatedInheritance scala
|deprecatedName scala
|deprecatedOverriding scala
|""".stripMargin,
">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" ->
"""|def
|derived - scala.CanEqual
|deprecated - scala.runtime.stdLibPatches.language
|""".stripMargin,
">=3.4.2-RC1-bin-20240301-hash-NIGHTLY" -> "def"
|""".stripMargin
)
)

Expand All @@ -512,14 +491,7 @@ class CompletionKeywordSuite extends BaseCompletionSuite {
|var
|varargs(): varargs
|varargs - scala.annotation
|""".stripMargin,
"3.4" -> """|val
|var
|varargs - scala.annotation
|""".stripMargin,
">=3.4.2-RC1-bin-20240301-hash-NIGHTLY" ->
"""|val
|var""".stripMargin
|""".stripMargin
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,18 +283,6 @@ class CompletionOverrideSuite extends BaseCompletionSuite {
|}
|""".stripMargin,
compat = Map(
scala3PresentationCompilerVersion ->
"""|package a.b
|abstract class Conflict {
| def self: Conflict
|}
|object Main {
| class Conflict
| new a.b.Conflict {
| def self: a.b.Conflict = ${0:???}
| }
|}
|""".stripMargin,
"3" ->
"""|package a.b
|
Expand Down Expand Up @@ -382,8 +370,6 @@ class CompletionOverrideSuite extends BaseCompletionSuite {
" def foo@@",
""" def foo: scala.collection.mutable.Set[Int] = ${0:???}""",
compat = Map(
scala3PresentationCompilerVersion ->
""" def foo: scala.collection.mutable.Set[Int] = ${0:???}""",
"3" ->
""" def foo: collection.mutable.Set[Int] = ${0:???}"""
)
Expand Down Expand Up @@ -465,17 +451,7 @@ class CompletionOverrideSuite extends BaseCompletionSuite {
|class Main extends Mutable {
| def foo: lang.StringBuilder = ${0:???}
|}
|""".stripMargin,
compat = Map(
scala3PresentationCompilerVersion ->
"""|abstract class Mutable {
| def foo: java.lang.StringBuilder
|}
|class Main extends Mutable {
| def foo: java.lang.StringBuilder = ${0:???}
|}
|""".stripMargin
)
|""".stripMargin
)

checkEditLine(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,7 @@ class CompletionScala3Suite extends BaseCompletionSuite {
|""".stripMargin,
"""|map[B](f: A => B): Foo[B]
|""".stripMargin,
topLines = Some(1),
compat = Map(
">=3.4.1-RC1-bin-20240201-hash-NIGHTLY" ->
"""|map[B](f: Int => B): Foo[B]
|""".stripMargin
)
topLines = Some(1)
)

checkEdit(
Expand Down
Loading

0 comments on commit a10784f

Please sign in to comment.