| Did you know ... | Search Documentation: |
| Packs (add-ons) for SWI-Prolog |
| 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 |
No reviews. Create the first review!.
:- use_module(library(quickcheck)).
% reversing a list twice gives back the same list
prop_reverse_twice(L:list) :-
reverse(L, R),
reverse(R, L).
?- quickcheck(prop_reverse_twice/1).
100 tests OK
true.
Randomized testing of program properties in the spirit of QuickCheck. Describe properties of your predicates and let library(quickheck) generate test cases for you.
A detailed tutorial is available.
Using SWI-Prolog 7.1 or later:
?- pack_install(quickcheck).
This module uses semantic versioning.
Source code available and pull requests accepted at https://github.com/nicoabie/quickcheck
Pack contains 12 files holding a total of 13.6K bytes.