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

Latest stable release: 0.5.0

Clojars Project

Leiningen dependency information:

[active-quickcheck "0.5.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?Edit on GitHub

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

× close