fakedata-quickcheck: Fake a -> Gen a

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

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


[Skip to Readme]

Properties

Versions 0.1.0, 0.1.0, 0.2.0
Change log None available
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:24:43Z

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


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