Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
mzuehlke committed Apr 26, 2024
1 parent 284c207 commit f911189
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,17 @@ class FilterAlgTest extends FunSuite {
assert(isDependencyConfigurationIgnored(dependency.copy(configurations = Some("scalafmt"))))
}

test("scalaLTSFilter: LTS") {
val update = ("org.scala-lang".g % "scala3-compiler".a % "3.3.3" %> Nel.of("3.4.0")).single
test("scalaLTSFilter: LTS, no update") {
val update = ("org.scala-lang".g % "scala3-compiler".a % "3.3.2" %> Nel.of("3.4.0")).single
assertEquals(scalaLTSFilter(update), Left(IgnoreScalaNext(update)))
}

test("scalaLTSFilter: LTS, filter versions") {
val update =
("org.scala-lang".g % "scala3-compiler".a % "3.3.2" %> Nel.of("3.3.3", "3.4.0")).single
assertEquals(scalaLTSFilter(update), Right(update.copy(newerVersions = Nel.of("3.3.3".v))))
}

test("scalaLTSFilter: Next") {
val update = ("org.scala-lang".g % "scala3-compiler".a % "3.4.0" %> Nel.of("3.4.1")).single
assertEquals(scalaLTSFilter(update), Right(update))
Expand Down

0 comments on commit f911189

Please sign in to comment.