cl-quickcheck - a Common Lisp port of the QuickCheck unit test framework
Common Lisp Ruby Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
features editorconfig Dec 5, 2016
.editorconfig editorconfig Dec 5, 2016
.envrc.sample nodenv Nov 11, 2016
.gitignore gitignore.io Oct 31, 2015
.node-version
Gemfile
Guardfile-cucumber regex Jan 20, 2014
LICENSE.md lili Sep 6, 2014
README.md editorconfig Dec 5, 2016
Rakefile editorconfig Dec 5, 2016
alpha.lisp editorconfig Dec 5, 2016
cl-quickcheck.asd
cl-quickcheck.lisp editorconfig Dec 5, 2016
documentation.txt lili Sep 6, 2014
example.lisp editorconfig Dec 5, 2016
inv-idx.lisp
lsets.lisp
money.lisp pass under SBCL 1.3.1 & CLISP 2.49 Feb 6, 2016
package.json
qcpaper.lisp editorconfig Dec 5, 2016
self-test.lisp editorconfig Dec 5, 2016
updoc.lisp editorconfig Dec 5, 2016

README.md

cl-quickcheck - a Common Lisp port of the QuickCheck unit test framework

EXAMPLE

$ clisp example.lisp
Starting tests with seed #S(RANDOM-STATE #*1111111000010000101001011100110101100110011101010000110100110111)
...
ERROR (ISNT MONEY= (DOLLARS 'M) (FRANCS M))

=: M is not a number

  with values #S(MONEY :AMOUNT M :CURRENCY USD) #S(MONEY :AMOUNT -2 :CURRENCY FRANC)
  for ((M -2))
  100/100 counterexamples.
FAIL (IS MONEY= (DOLLARS M) (DOLLARS N))
  with values #S(MONEY :AMOUNT 11 :CURRENCY USD) #S(MONEY :AMOUNT -19 :CURRENCY USD)
  for ((M 11) (N -19))
  98/100 counterexamples.
  0 cases checked and passed in 100 attempts.
95 tests submitted; 2 FAILED.

See example.lisp for more information.

INSTALL

$ clisp
> (ql:quickload 'cl-quickcheck)

REQUIREMENTS

Optional

DEVELOPMENT

Testing

Ensure the example script works as expected:

$ bundle
$ cucumber
Feature: Run example tests

  Scenario: Running example tests            # features/run_example_tests.feature:3
    Given the program has finished           # features/step_definitions/steps.rb:1
    Then the output is correct for each test # features/step_definitions/steps.rb:5

1 scenario (1 passed)
2 steps (2 passed)
0m4.913s

Guard can automatically run testing when the code changes:

$ bundle
$ guard -G Guardfile-cucumber
...

Linting

Keep the code tidy:

$ npm install
$ rake lint
...