Skip to content

Commit

Permalink
Merge pull request #847 from fthomas/topic/no-nats-in-scalacheck-tests
Browse files Browse the repository at this point in the history
Do not use Nat in scalacheck tests
  • Loading branch information
fthomas authored Sep 28, 2020
2 parents 6919a2f + 41f3ab3 commit 405be0b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,12 @@ import eu.timepit.refined.numeric.Interval
import eu.timepit.refined.scalacheck.collection._
import eu.timepit.refined.scalacheck.numeric._
import org.scalacheck.Properties
import shapeless.nat._

class CollectionArbitrarySpec extends Properties("CollectionArbitrary") {

property("List[String] Refined MaxSize[42]") =
checkArbitraryRefinedType[List[String] Refined MaxSize[W.`42`.T]]

property("List[String] Refined MaxSize[_13]") =
checkArbitraryRefinedType[List[String] Refined MaxSize[_13]]

property("List[Int] Refined NonEmpty") = checkArbitraryRefinedType[List[Int] Refined NonEmpty]

property("Vector[Int] Refined MaxSize[23]") =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,25 @@ import eu.timepit.refined.types.numeric._
import eu.timepit.refined.types.time.Minute
import org.scalacheck.Prop._
import org.scalacheck.Properties
import shapeless.nat._

class NumericArbitrarySpec extends Properties("NumericArbitrary") {

property("Less[10]") = checkArbitraryRefinedType[Int Refined Less[W.`10`.T]]

property("Less[-10]") = checkArbitraryRefinedType[Int Refined Less[W.`-10`.T]]

property("Less[_10]") = checkArbitraryRefinedType[Long Refined Less[_10]]

property("LessEqual[42]") = checkArbitraryRefinedType[Int Refined LessEqual[W.`42`.T]]

property("LessEqual[-42]") = checkArbitraryRefinedType[Int Refined LessEqual[W.`-42`.T]]

property("LessEqual[_10]") = checkArbitraryRefinedType[Long Refined LessEqual[_10]]

property("Greater[10]") = checkArbitraryRefinedType[Int Refined Greater[W.`10`.T]]

property("Greater[-10]") = checkArbitraryRefinedType[Int Refined Greater[W.`-10`.T]]

property("Greater[_10]") = checkArbitraryRefinedType[Long Refined Greater[_10]]

property("GreaterEqual[123]") = checkArbitraryRefinedType[Int Refined GreaterEqual[W.`123`.T]]

property("GreaterEqual[123]") = checkArbitraryRefinedType[Int Refined GreaterEqual[W.`-123`.T]]

property("GreaterEqual[_10]") = checkArbitraryRefinedType[Int Refined GreaterEqual[_10]]

property("NonNaNFloat") = checkArbitraryRefinedType[NonNaNFloat]

property("NonNaNDouble") = checkArbitraryRefinedType[NonNaNDouble]
Expand Down

0 comments on commit 405be0b

Please sign in to comment.