Skip to content

Commit

Permalink
Merge pull request #5577 from danicheg/series/0.22-scalacheck-year-ar…
Browse files Browse the repository at this point in the history
…bitrary

Use an instance of `Arbitrary[Year]` from ScalaCheck
  • Loading branch information
rossabaker committed Nov 14, 2021
2 parents 6801944 + c18dca6 commit 176b08d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tests/src/test/scala/org/http4s/QueryParamCodecSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ import cats.data._
import cats.laws.discipline.{arbitrary => _, _}
import cats.syntax.all._
import org.scalacheck.Arbitrary
import org.scalacheck.Arbitrary.{arbYear => _, _}
import org.scalacheck.Arbitrary._
import org.scalacheck.Cogen
import org.scalacheck.Gen
import org.scalacheck.Prop._

import java.time._
Expand Down Expand Up @@ -113,10 +112,6 @@ trait QueryParamCodecInstances {
as.forall(a => x.encode(a) == y.encode(a))
}

// TODO: Use scalacheck instance once this fix gets released https://github.com/typelevel/scalacheck/commit/2ae1be5c8e5ee1c14abea607d631e334a56796de
implicit final lazy val arbYear: Arbitrary[Year] =
Arbitrary(Gen.chooseNum(Year.MIN_VALUE + 1, Year.MAX_VALUE).map(Year.of))

implicit val eqInstant: Eq[Instant] = Eq.fromUniversalEquals

implicit val eqLocalDate: Eq[LocalDate] = Eq.fromUniversalEquals
Expand Down

0 comments on commit 176b08d

Please sign in to comment.