Skip to content

Commit

Permalink
Fix compiler warnings in tests (#3261)
Browse files Browse the repository at this point in the history
* Avoid warning from scalatest#961 assert macro bug

* Avoid deprecated ScalaTest method
  • Loading branch information
travisbrown authored Jan 20, 2020
1 parent 95cb4ae commit a4c994a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions tests/src/test/scala/cats/tests/ContravariantSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package tests
import cats.data.Const
import cats.kernel.laws.discipline.{MonoidTests, SemigroupTests}
import cats.laws.discipline.{ContravariantMonoidalTests, ExhaustiveCheck, MiniInt}
import org.scalactic.CanEqual
import org.scalacheck.{Arbitrary, Cogen}
import cats.laws.discipline.eq._
import cats.laws.discipline.arbitrary._
Expand All @@ -13,8 +12,6 @@ class ContravariantSuite extends CatsSuite {

test("narrow equals contramap(identity)") {
implicit val constInst: Contravariant[Const[Int, *]] = Const.catsDataContravariantForConst[Int]
implicit val canEqual: CanEqual[cats.data.Const[Int, Some[Int]], cats.data.Const[Int, Some[Int]]] =
StrictCatsEquality.lowPriorityConversionCheckedConstraint
forAll { (i: Int) =>
val const: Const[Int, Option[Int]] = Const[Int, Option[Int]](i)
val narrowed: Const[Int, Some[Int]] = constInst.narrow[Option[Int], Some[Int]](const)
Expand Down
2 changes: 1 addition & 1 deletion tests/src/test/scala/cats/tests/ReducibleSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class ReducibleSuiteAdditional extends CatsSuite {
val n = 100000
val xs = NES(Right(0), Stream.from(1).map(i => if (i < n) Right(i) else Left(i)))

assert(xs.reduceA === Left(n))
xs.reduceA should ===(Left(n))
}
}

Expand Down

0 comments on commit a4c994a

Please sign in to comment.