0.3.0 docs





    Apr 16, 2015



    Index of all namespaces

    « Project + dependencies

    QuickCheck clone for Clojure

    A QuickCheck clone for Clojure.


    - ==>

    A ->Arbitrary arbitrary arbitrary-ascii-char arbitrary-ascii-letter arbitrary-ascii-string arbitrary-boolean arbitrary-byte arbitrary-byte-array arbitrary-char arbitrary-float arbitrary-function arbitrary-int arbitrary-int-like arbitrary-integer arbitrary-integer-from-to arbitrary-keyword arbitrary-list arbitrary-long arbitrary-map arbitrary-mixed arbitrary-natural arbitrary-one-of arbitrary-printable-ascii-char arbitrary-printable-ascii-string arbitrary-rational arbitrary-record arbitrary-sequence-like arbitrary-set arbitrary-short arbitrary-string arbitrary-symbol arbitrary-symbol-like arbitrary-tuple arbitrary-unsigned-byte arbitrary-unsigned-int arbitrary-unsigned-long arbitrary-unsigned-short arbitrary-vector

    B bind

    C ->Check-result ->Config check check-results choose-alphanumeric-char choose-ascii-char choose-ascii-letter choose-byte choose-byte-array choose-char choose-char-with-property choose-float choose-int choose-integer choose-keyword choose-list choose-long choose-map choose-mixed choose-non-numeric-char choose-one-of choose-printable-ascii-char choose-set choose-short choose-string choose-symbol choose-unsigned-byte choose-unsigned-int choose-unsigned-long choose-unsigned-short choose-vector choose-with-frequencies classify coarbitrary coerce->generator coerce->result-generator collect

    D done

    E expand-arbitrary expand-has-arg-count expand-has-at-least-arg-count

    F for-all for-all-with-names fraction

    G ->Generator generate generator-m group-sizes

    L label lift->generator

    M make-rational map->Arbitrary map->Check-result map->Config map->Generator map->Property map-of-tuples

    N nothing

    P ->Property pick promote property

    Q quick quickcheck quickcheck-results

    R report-result resize result-add-arguments result-add-stamp return

    S sized stamp<?

    T tests trivial

    V variant verbose

    W write-argument write-arguments

    The README below is fetched from the published project artifact. Some relative links may be broken.

    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.3.0

    Leiningen dependency information:

    [active-quickcheck "0.3.0"]


    Use directly

      (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"
          (property [xs (list integer)
               ys (list integer)]
              (= (reverse (concat xs ys)) (concat (reverse ys) (reverse xs))))))))



    Copyright © 2013 Active Group GmbH

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