Skip to content

Commit

Permalink
chore: Unignore tests after backporting
Browse files Browse the repository at this point in the history
  • Loading branch information
tgodzik committed Jan 15, 2024
1 parent e3296a7 commit 30f8ab5
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,31 +268,31 @@ class Scala3DocumentHighlightSuite extends BaseDocumentHighlightSuite {
)

check(
"type-params-in-enum".tag(IgnoreForScala3CompilerPC),
"type-params-in-enum",
"""|enum MyOption[+<<A@@A>>]:
| case MySome(value: <<AA>>)
| case MyNone
|""".stripMargin
)

check(
"type-params-in-enum2".tag(IgnoreForScala3CompilerPC),
"type-params-in-enum2",
"""|enum MyOption[+<<AA>>]:
| case MySome(value: <<A@@A>>)
| case MyNone
|""".stripMargin
)

check(
"type-params-in-enum3".tag(IgnoreForScala3CompilerPC),
"type-params-in-enum3",
"""|enum MyOption[<<AA>>](v: <<AA>>):
| def get: <<A@@A>> = ???
| case MySome[AA](value: AA) extends MyOption[Int](1)
|""".stripMargin
)

check(
"type-params-in-enum4".tag(IgnoreForScala3CompilerPC),
"type-params-in-enum4",
"""|enum MyOption[+<<AA>>]:
| def get: <<A@@A>> = ???
| case MySome(value: <<AA>>)
Expand Down
10 changes: 5 additions & 5 deletions tests/cross/src/test/scala/tests/pc/CompletionArgSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ class CompletionArgSuite extends BaseCompletionSuite {
)

check(
"second-first".tag(IgnoreForScala3CompilerPC),
"second-first",
"""|object Main {
| def foo(aaa: Int, bbb: Int, ccc: Int) = aaa + bbb + ccc
| val k = foo (
Expand All @@ -1164,7 +1164,7 @@ class CompletionArgSuite extends BaseCompletionSuite {
)

check(
"second-first2".tag(IgnoreForScala3CompilerPC),
"second-first2",
"""|object Main {
| def foo(aaa: Int, bbb: Int, ccc: Int) = aaa + bbb + ccc
| val k = foo (
Expand All @@ -1180,7 +1180,7 @@ class CompletionArgSuite extends BaseCompletionSuite {
)

check(
"second-first3".tag(IgnoreForScala3CompilerPC),
"second-first3",
"""|object Main {
| def foo(ddd: Int)(aaa: Int, bbb: Int, ccc: Int) = aaa + bbb + ccc
| val k = foo(123)(
Expand All @@ -1196,7 +1196,7 @@ class CompletionArgSuite extends BaseCompletionSuite {
)

check(
"second-first4".tag(IgnoreScala2).tag(IgnoreForScala3CompilerPC),
"second-first4".tag(IgnoreScala2),
"""|object O:
| val hello: (x: Int, y: Int) => Unit = (x, _) => println(x)
|val k = O.hello(y = 1, @@)
Expand All @@ -1207,7 +1207,7 @@ class CompletionArgSuite extends BaseCompletionSuite {
)

check(
"second-first5".tag(IgnoreScala2).tag(IgnoreForScala3CompilerPC),
"second-first5".tag(IgnoreScala2),
"""|val hello: (x: Int) => Int => (str: String, ccc: String) => Unit = x => j => (str, _) => println(str)
|val k = hello(x = 1)(2)(ccc = "abc", @@)
|""".stripMargin,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CompletionIssueSuite extends BaseCompletionSuite {
}

check(
"comparison".tag(IgnoreForScala3CompilerPC),
"comparison",
"""package a
|object w {
| abstract class T(x: Int) {
Expand Down
59 changes: 51 additions & 8 deletions tests/cross/src/test/scala/tests/pc/CompletionKeywordSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package tests.pc
import tests.BaseCompletionSuite

class CompletionKeywordSuite extends BaseCompletionSuite {
override protected def ignoreScalaVersion: Option[IgnoreScalaVersion] =
Some(IgnoreForScala3CompilerPC)

check(
"super-template",
Expand Down Expand Up @@ -42,7 +40,10 @@ class CompletionKeywordSuite extends BaseCompletionSuite {
compat = Map(
"3" -> """|transient scala (commit: '')
|transparentTrait(): transparentTrait (commit: '')
|transparentTrait - scala.annotation (commit: '')""".stripMargin
|transparentTrait - scala.annotation (commit: '')""".stripMargin,
"3.4" -> """|transient scala (commit: '')
|transparentTrait - scala.annotation (commit: '')
|""".stripMargin
),
includeCommitCharacter = true
)
Expand All @@ -66,7 +67,11 @@ class CompletionKeywordSuite extends BaseCompletionSuite {
compat = Map(
"3" -> """|transient scala (commit: '')
|transparentTrait(): transparentTrait (commit: '')
|transparentTrait - scala.annotation (commit: '')""".stripMargin
|transparentTrait - scala.annotation (commit: '')""".stripMargin,
"3.4" ->
"""|transient scala (commit: '')
|transparentTrait - scala.annotation (commit: '')
|""".stripMargin
),
includeCommitCharacter = true
)
Expand Down Expand Up @@ -493,7 +498,11 @@ class CompletionKeywordSuite extends BaseCompletionSuite {
|var
|varargs(): varargs
|varargs - scala.annotation
|""".stripMargin
|""".stripMargin,
"3.4" -> """|val
|var
|varargs - scala.annotation
|""".stripMargin
)
)

Expand Down Expand Up @@ -555,7 +564,25 @@ class CompletionKeywordSuite extends BaseCompletionSuite {
includeCommitCharacter = true,
compat = Map(
"2" -> "",
"3.3" -> """|using (commit: '')
"3.3.0" -> """|using (commit: '')
|unsafeExceptions scala (commit: '')
|unchecked scala (commit: '')
|unsafe - scala.caps (commit: '')
|unsafeNulls - scala.runtime.stdLibPatches.language (commit: '')
|""".stripMargin,
"3.3.1" -> """|using (commit: '')
|unsafeExceptions scala (commit: '')
|unchecked scala (commit: '')
|unsafe - scala.caps (commit: '')
|unsafeNulls - scala.runtime.stdLibPatches.language (commit: '')
|""".stripMargin,
"3.3.2" -> """|using (commit: '')
|unsafeExceptions scala (commit: '')
|unchecked scala (commit: '')
|unsafe - caps (commit: '')
|unsafeNulls - scala.runtime.stdLibPatches.language (commit: '')
|""".stripMargin,
"3.4" -> """|using (commit: '')
|unsafeExceptions scala (commit: '')
|unchecked scala (commit: '')
|unsafe - scala.caps (commit: '')
Expand All @@ -577,11 +604,27 @@ class CompletionKeywordSuite extends BaseCompletionSuite {
|unsafeNulls - scala.runtime.stdLibPatches.language
|unshared(): unshared
|uncheckedStable(): uncheckedStable""".stripMargin,
"3.3" -> """|unsafeExceptions scala
"3.3.0" -> """|unsafeExceptions scala
|unchecked scala
|unsafe - scala.caps
|unsafeNulls - scala.runtime.stdLibPatches.language
|unshared(): unshared""".stripMargin,
"3.3.1" -> """|unsafeExceptions scala
|unchecked scala
|unsafe - scala.caps
|unsafeNulls - scala.runtime.stdLibPatches.language
|unshared(): unshared""".stripMargin,
"3.3.2" -> """|unsafeExceptions scala
|unchecked scala
|unsafe - caps
|unsafeNulls - scala.runtime.stdLibPatches.language
|unshared(): unshared""".stripMargin,
"3.4" -> """|unsafeExceptions scala
|unchecked scala
|unsafe - scala.caps
|unsafeNulls - scala.runtime.stdLibPatches.language
|unshared(): unshared""".stripMargin
|unused - scala.annotation
|""".stripMargin
),
topLines = Some(5)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class CompletionScala3Suite extends BaseCompletionSuite {

check(
"multi-export".tag(
IgnoreScalaVersion.forLessThan("3.2.2").and(IgnoreForScala3CompilerPC)
IgnoreScalaVersion.forLessThan("3.2.2")
),
"""|export scala.collection.{AbstractMap, Set@@}
|""".stripMargin,
Expand Down
23 changes: 4 additions & 19 deletions tests/cross/src/test/scala/tests/pc/CompletionSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ class CompletionSuite extends BaseCompletionSuite {
)

check(
"import-star-multi-import".tag(IgnoreForScala3CompilerPC),
"import-star-multi-import",
"""
|import scala.collection.immutable.List.{range => r, *@@}
|""".stripMargin,
Expand Down Expand Up @@ -1020,14 +1020,6 @@ class CompletionSuite extends BaseCompletionSuite {
"""|Some(value) scala
|Some scala
|Some[A](value: A): Some[A]
|""".stripMargin,
scala3PresentationCompilerVersion ->
"""|Some(value) scala
|Some scala
|Some[A](value: A): Some[A]
|SomeToExpr(x: Some[T])(using Quotes): Expr[Some[T]]
|SomeToExpr[T: Type: ToExpr]: SomeToExpr[T]
|SomeFromExpr[T](using Type[T], FromExpr[T]): SomeFromExpr[T]
|""".stripMargin
)
)
Expand All @@ -1045,13 +1037,6 @@ class CompletionSuite extends BaseCompletionSuite {
"3" ->
"""|Some scala
|Some[A](value: A): Some[A]
|""".stripMargin,
scala3PresentationCompilerVersion ->
"""|Some scala
|Some[A](value: A): Some[A]
|SomeToExpr(x: Some[T])(using Quotes): Expr[Some[T]]
|SomeToExpr[T: Type: ToExpr]: SomeToExpr[T]
|SomeFromExpr[T](using Type[T], FromExpr[T]): SomeFromExpr[T]
|""".stripMargin
)
)
Expand Down Expand Up @@ -2153,7 +2138,7 @@ class CompletionSuite extends BaseCompletionSuite {
)

check(
"multi-imports".tag(IgnoreForScala3CompilerPC),
"multi-imports",
"""|import scala.collection.{AbstractMap, Set@@}
|""".stripMargin,
"""|Set scala.collection
Expand All @@ -2178,7 +2163,7 @@ class CompletionSuite extends BaseCompletionSuite {
)

check(
"multi-imports-empty-query".tag(IgnoreForScala3CompilerPC),
"multi-imports-empty-query",
"""|import scala.collection.{AbstractMap, @@}
|""".stripMargin,
"""|+: scala.collection
Expand Down Expand Up @@ -2206,7 +2191,7 @@ class CompletionSuite extends BaseCompletionSuite {
)

check(
"import-rename".tag(IgnoreForScala3CompilerPC),
"import-rename",
"""|import scala.collection.{AbstractMap => Set@@}
|""".stripMargin,
""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ import tests.BaseSyntheticDecorationsSuite

class SyntheticDecorationsSuite extends BaseSyntheticDecorationsSuite {

override protected def ignoreScalaVersion: Option[IgnoreScalaVersion] = Some(
IgnoreForScala3CompilerPC
)

check(
"type-params",
"""|object Main {
Expand Down Expand Up @@ -568,7 +564,7 @@ class SyntheticDecorationsSuite extends BaseSyntheticDecorationsSuite {
)

check(
"val-def-with-bind",
"val-def-with-bind".tag(IgnoreForScala3CompilerPC),
"""|object O {
| val tupleBound @ (one, two) = ("1", "2")
|}
Expand All @@ -580,7 +576,7 @@ class SyntheticDecorationsSuite extends BaseSyntheticDecorationsSuite {
)

check(
"val-def-with-bind-and-comment",
"val-def-with-bind-and-comment".tag(IgnoreForScala3CompilerPC),
"""|object O {
| val tupleBound /* comment */ @ (one, two) = ("1", "2")
|}
Expand Down

0 comments on commit 30f8ab5

Please sign in to comment.