* gnu/packages/rust.scm (rust-quickcheck): New variable.
---
gnu/packages/rust.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 08d168143..5f767212b 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1408,3 +1408,38 @@ Rust compiler as a standalone testing harness.")
"@code{strsim} provides implementations of string similarity metrics.
Includes Hamming, Levenshtein, Damerau-Levenshtein, Jaro, and Jaro-Winkler.")
(license license:expat)))
+
+(define-public rust-quickcheck
+ (package
+ (name "rust-quickcheck")
+ (version "0.4.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "quickcheck" version))
+ (file-name
+ (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "01hligcv1h4pvc8ykch65qjzi7jgcq2s462v69j27slc84fl3hh2"))))
+ (build-system cargo-build-system)
+ (inputs
+ `(("rust-log" ,rust-log "src")
+ ;; TODO: ("rust-env-logger" ,rust-env-logger "src")
+ ("rust-rand" ,rust-rand "src")))
+ (home-page "https://github.com/BurntSushi/quickcheck")
+ (synopsis "Automatic property based testing with shrinking")
+ (description
+ "QuickCheck is a way to do property based testing using randomly
+generated input. This crate comes with the ability to randomly
+generate and shrink integers, floats, tuples, booleans, lists, strings,
+options and results. All QuickCheck needs is a property function, it
+will then randomly generate inputs to that function and call the
+property for each set of inputs. If the property fails (whether by a
+runtime error like index out-of-bounds or by not satisfying your
+property), the inputs are \"shrunk\" to find a smaller counter-example.
+
+The shrinking strategies for lists and numbers use a binary search to
+cover the input space quickly. It should be the same strategy used in
+Koen Claessen's QuickCheck for Haskell.")
+ (license (list license:unlicense license:expat))))
--
2.11.0