Skip to content

Commit

Permalink
Merge pull request #1022 from ceedubs/semilattice-tests
Browse files Browse the repository at this point in the history
Add law-checking for asMeetPartialOrder and asJoinPartialOrder
  • Loading branch information
ceedubs committed May 9, 2016
2 parents 19d0de0 + e21b6e8 commit 4285a07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,11 @@ lazy val publishSettings = Seq(
) ++ credentialSettings ++ sharedPublishSettings ++ sharedReleaseProcess

// These aliases serialise the build for the benefit of Travis-CI.
addCommandAlias("buildJVM", ";macrosJVM/compile;coreJVM/compile;coreJVM/test;lawsJVM/compile;freeJVM/compile;testsJVM/test;freeJVM/test;jvm/test;bench/test")
addCommandAlias("buildJVM", ";macrosJVM/compile;coreJVM/compile;kernelLawsJVM/compile;lawsJVM/compile;freeJVM/compile;kernelLawsJVM/test;coreJVM/test;testsJVM/test;freeJVM/test;jvm/test;bench/test")

addCommandAlias("validateJVM", ";scalastyle;buildJVM;makeSite")

addCommandAlias("validateJS", ";macrosJS/compile;coreJS/compile;lawsJS/compile;testsJS/test;js/test")
addCommandAlias("validateJS", ";macrosJS/compile;kernelJS/compile;coreJS/compile;kernelLawsJS/compile;lawsJS/compile;kernelLawsJS/test;testsJS/test;js/test")

addCommandAlias("validate", ";validateJS;validateJVM")

Expand Down
2 changes: 2 additions & 0 deletions kernel-laws/src/test/scala/cats/kernel/laws/LawTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class LawTests extends FunSuite with Discipline {
laws[OrderLaws, List[HasPartialOrder[Int]]].check(_.partialOrder)
laws[OrderLaws, Vector[HasPartialOrder[Int]]].check(_.partialOrder)
laws[OrderLaws, Stream[HasPartialOrder[Int]]].check(_.partialOrder)
laws[OrderLaws, Set[Int]]("asMeetPartialOrder").check(_.partialOrder(Semilattice.asMeetPartialOrder[Set[Int]]))
laws[OrderLaws, Set[Int]]("asJoinPartialOrder").check(_.partialOrder(Semilattice.asJoinPartialOrder[Set[Int]]))

laws[OrderLaws, Unit].check(_.order)
laws[OrderLaws, Boolean].check(_.order)
Expand Down

0 comments on commit 4285a07

Please sign in to comment.