Skip to content

Commit

Permalink
Improve SemVer creation, fix test tags
Browse files Browse the repository at this point in the history
  • Loading branch information
rochala committed Oct 3, 2023
1 parent 487fc33 commit 26d13c9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ object SemVer {
}
.getOrElse((None, None))
// specific condition for Scala 3 nightlies - 3.2.0-RC1-bin-20220307-6dc591a-NIGHTLY
val date =
if (parts.lift(7).contains("NIGHTLY"))
parts.lift(5).flatMap(d => Try(d.toInt).toOption)
else None
val date = parts.lift(5).flatMap(d => Try(d.toInt).toOption)
Version(major, minor, patch, rc, milestone, date)
}

Expand Down
32 changes: 16 additions & 16 deletions tests/cross/src/test/scala/tests/pc/CompletionSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1729,7 +1729,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-scope".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|trait Foo
|object T:
Expand All @@ -1741,7 +1741,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-symbol-search".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|object T:
| extension (x: ListBuffe@@)
Expand All @@ -1753,7 +1753,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-type-parameter".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|trait Foo
|object T:
Expand All @@ -1765,7 +1765,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-type-parameter-symbol-search".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|object T:
| extension [A <: ListBuffe@@]
Expand All @@ -1777,7 +1777,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-using-param-clause".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|trait Foo
|object T:
Expand All @@ -1789,7 +1789,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-mix-1".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|trait Foo
|object T:
Expand All @@ -1801,7 +1801,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-mix-2".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|trait Foo
|object T:
Expand All @@ -1813,7 +1813,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-mix-3".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|trait Foo
|object T:
Expand All @@ -1825,7 +1825,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-mix-4".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|trait Foo
|object T:
Expand All @@ -1837,7 +1837,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-mix-5".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|trait Foo
|object T:
Expand All @@ -1849,7 +1849,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-mix-6".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|trait Foo
|object T:
Expand All @@ -1861,7 +1861,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-mix-7".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|trait Foo
|object T:
Expand All @@ -1873,7 +1873,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-select".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|object Test:
| class TestSelect()
Expand All @@ -1886,7 +1886,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-select-mix-1".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|object Test:
| class TestSelect()
Expand All @@ -1899,7 +1899,7 @@ class CompletionSuite extends BaseCompletionSuite {

check(
"extension-definition-select-mix-2".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|object Test:
| class TestSelect[T]()
Expand All @@ -1912,7 +1912,7 @@ class CompletionSuite extends BaseCompletionSuite {
)

checkEdit(
"no-square-brackets",
"no-square-brackets".tag(IgnoreScala2),
"""|object O:
| val a = List.appl@@
|""".stripMargin,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ class CompletionWorkspaceSuite extends BaseCompletionSuite {

checkEdit(
"match-typed".tag(
IgnoreScalaVersion.for3LessThan("3.4.0-RC1-bin-20231004")
IgnoreScalaVersion.forLessThan("3.4.0-RC1-bin-20231004")
),
"""|object Main {
| def foo(): Unit = null match {
Expand Down

0 comments on commit 26d13c9

Please sign in to comment.