forked from nick8325/quickcheck
-
Notifications
You must be signed in to change notification settings - Fork 1
Automatic testing of Haskell programs.
License
Rewbert/quickcheck
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Roberts fork: this fork contains experimental support for running tests in parallel, and shrinking in parallel.
Only the internal evaluation of a property is changed, so the API of QC remains unchanged. There is a module
`Test.QuickCheck.Features` which I've completely commented out for now, so that will obviously not work.
In order to try this out yourself, you must follow three steps:
1: You need to make sure cabal knows where my fork of QC exists. You do this by either cloning this repository onto your local machine and pointing your `cabal.project` to it.
You do this e.g. by adding the line `packages: *.cabal <path-to-qc>/QuickCheck.cabal`. You can also optionally point your cabal to this remote repository. You do this by
editing your `cabal.project` to say
```
source-repository-package
type: git
location: https://github.com/Rewbert/quickcheck.git
-- optionally also add this to point to a particular commit, otherwise you will always get the freshest master commit
-- tag: <commit hash of the version you want>
```
2: You need to add some flags when you compile your code. Specifically, `-threaded -feager-blackholing -rtsopts`.
3: Finally, all that is left is to change the call to `quickCheck` with a call to `quickCheckPar`. If you don't want parallel shrinking, you should call `quickCheckParWith (stdArgs { parallelShrinking = False}) property`.
4: You also need to pass in the runtime option that actually creates more HECs. You need to either instead of `cabal run executable` do `cabal run executable -- +RTS -N` or `-Nx` where x is a number between 1 and the number of cores you have. You can also ddd another compilation option `-with-rtsopts=-N` or `-with-rtsopts=-Nx`
As a sanity check of whether you are using my fork or not, if you run `quickCheckPar` with just 1 HEC available, the word `donkey` will be printed.
This is QuickCheck 2, a library for random testing of program properties.
Add `QuickCheck` to your package dependencies to use it in tests or REPL.
The quickcheck-instances [1] companion package provides instances for types in
Haskell Platform packages at the cost of additional dependencies.
The make-hugs script makes a Hugs-compatible version of QuickCheck.
It may also be useful for other non-GHC implementations.
[1]: http://hackage.haskell.org/package/quickcheck-instances
About
Automatic testing of Haskell programs.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- Haskell 99.5%
- Shell 0.5%