https://github.com/active-group/active-quickcheck
QuickCheck clone
https://github.com/active-group/active-quickcheck
Last synced: 8 months ago
JSON representation
QuickCheck clone
- Host: GitHub
- URL: https://github.com/active-group/active-quickcheck
- Owner: active-group
- Created: 2014-12-17T14:32:01.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2022-10-17T11:25:18.000Z (over 3 years ago)
- Last Synced: 2025-06-17T20:09:02.971Z (about 1 year ago)
- Language: Clojure
- Size: 265 KB
- Stars: 4
- Watchers: 16
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Active QuickCheck
A Clojure port of the original Haskell QuickCheck.
(We looked at
[ClojureCheck](https://bitbucket.org/kotarak/clojurecheck),
[`clojure.test.generative`](https://github.com/clojure/test.generative),
but neither seems faithful to the original, particularly concerning
the reproducibility of test runs, and a set of generator combinators
that includes random generation of functions.
[`test.check`](https://github.com/clojure/test.check) is going down
the right path, but it's lacking some features we want, and is moving
too slow for our purposes.
This library, however, is a straighforward port of the Haskell code
from John Hughes's original paper.
## Releases and Dependency Information
[](https://clojars.org/de.active-group/active-quickcheck)
[Leiningen](https://github.com/technomancy/leiningen) dependency information:
[de.active-group/active-quickcheck "0.7.0"]
## Usage
### Use directly
(quickcheck
(property [xs (list integer)
ys (list integer)]
(= (reverse (concat xs ys)) (concat (reverse ys) (reverse xs)))))
### Use from `clojure.test`
(deftest reverse-distributes-over-concat
(testing "reverse distributes over concat"
(is
(quickcheck
(property [xs (list integer)
ys (list integer)]
(= (reverse (concat xs ys)) (concat (reverse ys) (reverse xs))))))))
## Documentation
- [Introduction](https://github.com/active-group/active-quickcheck/blob/master/doc/intro.md)
- [Integration with Clojure spec](https://github.com/active-group/active-quickcheck/blob/master/doc/spec.md)
## License
Copyright © 2013-2019 Active Group GmbH
Distributed under the Eclipse Public License, the same as Clojure.