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

Use an instance of Arbitrary[Year] from ScalaCheck #5577

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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