Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fakedata-haskell/fakedata-quickcheck
Fake a -> Gen a
https://github.com/fakedata-haskell/fakedata-quickcheck
Last synced: 26 days ago
JSON representation
Fake a -> Gen a
- Host: GitHub
- URL: https://github.com/fakedata-haskell/fakedata-quickcheck
- Owner: fakedata-haskell
- License: mit
- Created: 2020-10-12T07:01:01.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-09T10:45:09.000Z (over 3 years ago)
- Last Synced: 2024-04-26T00:08:37.342Z (8 months ago)
- Language: Haskell
- Size: 90.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: Changelog.md
- License: LICENSE
Awesome Lists containing this project
README
> If the truth shall kill them, let them die.
This library allows you to make [quickcheck Generators](https://hackage.haskell.org/package/QuickCheck-2.14.1/docs/Test-QuickCheck-Gen.html#t:Gen)
out of [Fake](https://hackage.haskell.org/package/fakedata-0.8.0/docs/Faker.html#t:Fake) functions from fakedata.```haskell
import qualified Faker.Company as CMisDomain :: Text -> Bool
isDomain = (=~ "^[A-Za-z_]+\\.[a-z]{1,4}$") . T.unpackspec :: 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.