kowainik / prolens

👓 Profunctor based lightweight implementation of Lenses
Mozilla Public License 2.0
72 stars 4 forks source link

Refactor laws tests #44

Closed chshersh closed 4 years ago

chshersh commented 4 years ago

Implement general functions for laws property-testing to avoid code duplication. Ideally, the calls to laws should look like this:

lawsSpecs :: Spec
lawsSpecs = describe "Laws" $ do
    describe "Profunctor" $ do
        profunctorLaws "->"     genFunction (===)
        profunctorLaws "Fun"    genFun      eqFun
        profunctorLaws "Forget" genForget   eqForget
vrom911 commented 4 years ago

Resolved in #45