fakedata-quickcheck: Fake a -> Gen a

[ fake, fakedata, library, mit, random ] [ Propose Tags ] [ Report a vulnerability ]

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


[Skip to Readme]

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0, 0.2.0
Dependencies base (>=4.7 && <5), fakedata, QuickCheck (>=2.6 && <2.15), random [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 psibi at 2021-06-22T07:45:38Z
Distributions NixOS:0.2.0
Downloads 628 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2021-06-22 [all 1 reports]

Readme for fakedata-quickcheck-0.2.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.