Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala 2.13.2 #235

Merged
merged 1 commit into from
Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: scala

scala:
- 2.12.10
- 2.13.1
- 2.12.11
- 2.13.2

jdk:
- openjdk8
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._

lazy val buildSettings = Seq(
organization := "org.typelevel",
scalaVersion := "2.13.1",
scalaVersion := "2.13.2",
crossScalaVersions := Seq("2.12.11", scalaVersion.value)
)

Expand Down
16 changes: 8 additions & 8 deletions core/src/test/scala/cats/sequence/SequenceSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,24 @@ class SequenceSuite extends KittensSuite {
test("sequencing record of Option")(check {
forAll { (x: Option[Int], y: Option[String], z: Option[Float]) =>
val expected = for (a <- x; b <- y; c <- z)
yield (Symbol("a") ->> a) :: (Symbol("b") ->> b) :: (Symbol("c") ->> c) :: HNil
((Symbol("a") ->> x) :: (Symbol("b") ->> y) :: (Symbol("c") ->> z) :: HNil).sequence == expected
yield ("a" ->> a) :: ("b" ->> b) :: ("c" ->> c) :: HNil
(("a" ->> x) :: ("b" ->> y) :: ("c" ->> z) :: HNil).sequence == expected
}
})

test("sequencing record of Option using RecordArgs")(check {
forAll { (x: Option[Int], y: Option[String], z: Option[Float]) =>
val expected = for (a <- x; b <- y; c <- z)
yield (Symbol("a") ->> a) :: (Symbol("b") ->> b) :: (Symbol("c") ->> c) :: HNil
yield ("a" ->> a) :: ("b" ->> b) :: ("c" ->> c) :: HNil
sequenceRecord(a = x, b = y, c = z) == expected
}
})

test("sequencing record of Either")(check {
forAll { (x: Either[String, Int], y: Either[String, String], z: Either[String, Float]) =>
val expected = for (a <- x; b <- y; c <- z)
yield (Symbol("a") ->> a) :: (Symbol("b") ->> b) :: (Symbol("c") ->> c) :: HNil
((Symbol("a") ->> x) :: (Symbol("b") ->> y) :: (Symbol("c") ->> z) :: HNil).sequence == expected
yield ("a" ->> a) :: ("b" ->> b) :: ("c" ->> c) :: HNil
(("a" ->> x) :: ("b" ->> y) :: ("c" ->> z) :: HNil).sequence == expected
}
})

Expand All @@ -98,7 +98,7 @@ class SequenceSuite extends KittensSuite {
val f2 = (_: String).reverse
val f3 = (_: String).toDouble
val f = sequenceRecord(a = f1, b = f2, c = f3)
val expected = (Symbol("a") ->> 4) :: (Symbol("b") ->> "0.24") :: (Symbol("c") ->> 42.0) :: HNil
val expected = ("a" ->> 4) :: ("b" ->> "0.24") :: ("c" ->> 42.0) :: HNil
assert(f("42.0") == expected)
}

Expand All @@ -107,7 +107,7 @@ class SequenceSuite extends KittensSuite {
val f2 = ((_: String).reverse) andThen Option.apply
val f3 = ((_: String).toDouble) andThen Option.apply
val f = sequenceRecord(a = Kleisli(f1), b = Kleisli(f2), c = Kleisli(f3))
val expected = Some((Symbol("a") ->> 4) :: (Symbol("b") ->> "0.24") :: (Symbol("c") ->> 42.0) :: HNil)
val expected = Some(("a" ->> 4) :: ("b" ->> "0.24") :: ("c" ->> 42.0) :: HNil)
assert(f.run("42.0") == expected)
}

Expand Down Expand Up @@ -159,5 +159,5 @@ class SequenceSuite extends KittensSuite {
}

object SequenceSuite {
val recordSequencer = the[RecordSequencer[Record.`'a -> Option[Int], 'b -> Option[String]`.T]]
val recordSequencer = the[RecordSequencer[Record.`"a" -> Option[Int], "b" -> Option[String]`.T]]
}