Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "quickcheck"

Title:QuickCheck randomized testing
Rating:Not rated. Create the first rating!
Latest version:0.3.0
SHA1 sum:cde06a0417eb26b23d3a55b5202a4beb769194b5
Author:Michael Hendricks <michael@ndrix.org>
Maintainer:Nico Gallinal <nicoabie@gmail.com>
Packager:Nico Gallinal <nicoabie@gmail.com>
Home page:https://github.com/nicoabie/quickcheck
Download URL:https://github.com/nicoabie/quickcheck/archive/v0.3.0.zip

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
0.3.0cde06a0417eb26b23d3a55b5202a4beb769194b54https://github.com/nicoabie/quickcheck.git
60414e99f640015f673fcd0d21a70c6e2b29a5092https://github.com/nicoabie/quickcheck.git
87dddf9ea75842b2534a7743b6340cd91235d5f5101https://github.com/nicoabie/quickcheck.git
bfefa3ef0fe8d734002a935163ddc226d1d160591https://github.com/nicoabie/quickcheck/archive/v0.3.0.zip
0.2.37f28f253179d974335dd926c44b86983de1a38ae1https://github.com/nicoabie/quickcheck.git
e45322a315ced69d4f4798adb193cd2223439fc24https://github.com/nicoabie/quickcheck.git
480dccf57e0f1552ae447de95f2610a725b56e2c1https://github.com/nicoabie/quickcheck.git
0.2.2f06fc74fb244f50c316fac788544ecc41041efed3https://github.com/nicoabie/quickcheck/archive/v0.2.2.zip
b9c13e525a4820b290049ef98a475cd7fbe8f89a1https://github.com/nicoabie/quickcheck.git
1f53751eb7cb27838a0548116cdad7c5d38a7e481https://github.com/nicoabie/quickcheck.git
0.2.17d2b517e7ae867653919c2931a4d48b69d3ee2e51https://github.com/nicoabie/quickcheck/archive/v0.2.1.zip
0.2.05b5d527135acb19354eae7d9078544757c1bc88432https://github.com/mndrix/quickcheck/archive/v0.2.0.zip
401fa2e2ab07a7a20ec9273be43b324cfffd6eae35https://github.com/mndrix/quickcheck.git
0.1.162fa116656fc1df202e12bad66456def8bdfe5272https://github.com/mndrix/quickcheck/archive/v0.1.1.zip
0.1.0109deb3a9a3f46b0261c9ec2811b2b3353bf2e302https://github.com/mndrix/quickcheck/archive/v0.1.0.zip
4a92f3ed5bc5896361b3e2e338b4c057abf66f7516https://github.com/mndrix/quickcheck.git
0.0.303820d6d8f7b29798d443d90b8a080508a88f92a16http://packs.ndrix.com/quickcheck/quickcheck-0.0.3.tgz
0.0.2d508afe81204f4438eaad6f79ec7da7d2da2b5f011http://packs.ndrix.com/quickcheck/quickcheck-0.0.2.tgz
0.0.1be8e81e38aa726848d368916e6eb386f62a808041http://packs.ndrix.com/quickcheck/quickcheck-0.0.1.tgz

quickcheck

Randomized testing of program properties in the spirit of QuickCheck. Describe properties of your predicates and let library(quickheck) generate test cases for you. ![CircleCI](https://circleci.com/gh/nicoabie/quickcheck) ![SemVer](https://semver.org/) ![PRs Welcome](https://github.com/nicoabie/quickcheck/labels/good%20first%20issue) ![License](https://unlicense.org)

Example

:- use_module(library(quickcheck)).

% reversing a list twice gives back the same list
prop_reverse_twice(L:list) :-
    reverse(L, R),
    reverse(R, L).

prop_silly_list(L:list(integer)) :-
    length(L, Len),
    Len =:= 3.  % nonsense!

?- quickcheck(prop_reverse_twice/1).
100 tests OK
true.

?- quickcheck(prop_silly_list/1).
Shrinking to depth 1
Failed test prop_silly_list([]:list(integer))
false.

Installation

To install as a package:

?- pack_install(quickcheck).

Tested with Swi-Prolog 8.0.x but should work with earlier versions too.

Running tests

In the package root, insert into swipl:

[tests/tests].
run_tests.

Or if you cloned the repo:

make test

Built With

Bug reports/feature requests

Please send bug reports/feature request through the GitHub project page.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

The UNLICENSE license. See the [LICENSE](LICENSE) file for details.

Contents of pack "quickcheck"

Pack contains 27 files holding a total of 28.9K bytes.