Liking cljdoc? Tell your friends :D

Active QuickCheck

A Clojure port of the original Haskell QuickCheck.

(We looked at ClojureCheck, 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 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

Clojars Project

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

License

Copyright © 2013-2019 Active Group GmbH

Distributed under the Eclipse Public License, the same as Clojure.

Can you improve this documentation? These fine people already did:
Mike Sperber, Marcus Crestani, dfrese, Markus Schlegel & David Frese
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close