fakedata-quickcheck: Fake a -> Gen a

[ fake, fakedata, library, mit, random ] [ Propose Tags ]

Use fakedata Fake monad for quicheck tests. See readme for examples at https://github.com/fakedata-haskell/fakedata-quickcheck.

[Skip to Readme]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees


Versions [RSS] 0.1.0, 0.2.0
Dependencies base (>=4.7 && <5), fakedata (>=0.6.0 && <0.9.0), QuickCheck (>=2.6 && <2.15), random (>=1 && <1.2.0) [details]
License MIT
Copyright 2020 Jappie Klooster
Author Jappie Klooster
Maintainer jappieklooster@hotmail.com
Category Random, Fake, FakeData
Home page https://github.com/fakedata-haskell/fakedata-quickcheck#readme
Bug tracker https://github.com/fakedata-haskell/fakedata-quickcheck/issues
Source repo head: git clone https://github.com/fakedata-haskell/fakedata-quickcheck
Uploaded by Jappie at 2020-10-15T07:26:59Z
Distributions LTSHaskell:0.2.0, NixOS:0.2.0, Stackage:0.2.0
Downloads 325 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2020-10-15 [all 1 reports]

Readme for fakedata-quickcheck-0.1.0

[back to package description]

If the truth shall kill them, let them die.

This library allows you to make quickcheck Generators out of Fake functions from fakedata.

import qualified Faker.Company as CM

isDomain :: Text -> Bool
isDomain = (=~ "^[A-Za-z_]+\\.[a-z]{1,4}$") . T.unpack

spec :: Spec
spec = do
  describe "fakedata quickcheck" $
  it "forall domain fullfils is a domain name regex" $
    Q.property $ Q.forAll (fakeQuickcheck CM.domain) isDomain

See the full code in the tests.

Added to a separate project as discussed in here