Skip to content

Commit

Permalink
updated to cats 1.0.0-MF
Browse files Browse the repository at this point in the history
  • Loading branch information
kailuowang committed Aug 3, 2017
1 parent f68d279 commit 81b865c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ lazy val commonSettings = Seq(
"bintray/non" at "http://dl.bintray.com/non/maven"
),
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % "0.9.0",
"org.typelevel" %% "alleycats-core" % "0.1.9",
"org.typelevel" %% "cats-core" % "1.0.0-MF",
"org.typelevel" %% "alleycats-core" % "0.2.0",
"com.chuusai" %% "shapeless" % "2.3.2",
"org.typelevel" %% "export-hook" % "1.2.0",
"org.scalatest" %% "scalatest" % "3.0.3" % "test",
"org.scalacheck" %% "scalacheck" % "1.13.5" % "test",
"org.typelevel" %% "cats-laws" % "0.9.0" % "test",
"org.typelevel" %% "cats-laws" % "1.0.0-MF" % "test",
"org.typelevel" %% "discipline" % "0.7.3" % "test",
compilerPlugin("org.spire-math" %% "kind-projector" % "0.9.4")
),
Expand Down Expand Up @@ -141,7 +141,7 @@ lazy val releaseSettings = Seq(
publishArtifacts,
setNextVersion,
commitNextVersion,
ReleaseStep(action = Command.process("sonatypeReleaseAll", _)),
ReleaseStep(action = Command.process("sonatypeReleaseAll", _), enableCrossBuild = true),
pushChanges
)
)
Expand Down
10 changes: 5 additions & 5 deletions core/src/test/scala/cats/sequence/sequence.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ class SequenceTests extends KittensSuite {

test("sequencing Option")(check {
forAll { (x: Option[Int], y: Option[String], z: Option[Float]) =>
val expected = (x |@| y |@| z) map (_ :: _ :: _ :: HNil)
val expected = (x, y, z) mapN (_ :: _ :: _ :: HNil)
(x :: y :: z :: HNil).sequence == expected
}
})

test("sequencing Either")(check {
forAll { (x: Either[String, Int], y: Either[String, String], z: Either[String, Float]) =>
val expected = (x |@| y |@| z) map (_ :: _ :: _ :: HNil)
val expected = (x, y, z) mapN (_ :: _ :: _ :: HNil)
(x :: y :: z :: HNil).sequence == expected
}
})

// note: using the ValidationNel type alias here breaks the implicit search
test("sequencing ValidatedNel")(check {
forAll { (x: Validated[NonEmptyList[String], Int], y: Validated[NonEmptyList[String], String], z: Validated[NonEmptyList[String], Float]) =>
val expected = (x |@| y |@| z) map (_ :: _ :: _ :: HNil)
val expected = (x, y, z) mapN (_ :: _ :: _ :: HNil)
sequence(x, y, z) == expected
}
})
Expand Down Expand Up @@ -112,7 +112,7 @@ class SequenceTests extends KittensSuite {
test("sequence gen for Option")(check {
forAll { (x: Option[Int], y: Option[String], z: Option[Float]) =>
val myGen = sequenceGeneric[MyCase]
val expected = (x |@| y |@| z) map MyCase.apply
val expected = (x, y, z) mapN MyCase.apply

myGen(a = x, b = y, c = z) == expected
}
Expand All @@ -121,7 +121,7 @@ class SequenceTests extends KittensSuite {
test("sequence gen for Either")(check {
forAll { (x: Either[String, Int], y: Either[String, String], z: Either[String, Float]) =>
val myGen = sequenceGeneric[MyCase]
val expected = (x |@| y |@| z) map MyCase.apply
val expected = (x, y, z) mapN MyCase.apply

myGen(a = x, b = y, c = z) == expected
}
Expand Down

0 comments on commit 81b865c

Please sign in to comment.