From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: [PATCH 51/86] gnu: Add rust-quickcheck. Date: Tue, 3 Jan 2017 23:36:07 +0000 Message-ID: <20170103233642.3181-52-ng0@libertad.pw> References: <20170103233642.3181-1-ng0@libertad.pw> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOYeq-00043j-5J for guix-devel@gnu.org; Tue, 03 Jan 2017 18:38:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOYep-0001s8-69 for guix-devel@gnu.org; Tue, 03 Jan 2017 18:38:20 -0500 Received: from aibo.runbox.com ([91.220.196.211]:33464) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cOYeo-0001rB-JD for guix-devel@gnu.org; Tue, 03 Jan 2017 18:38:18 -0500 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1cOYen-0002YH-Br for guix-devel@gnu.org; Wed, 04 Jan 2017 00:38:17 +0100 In-Reply-To: <20170103233642.3181-1-ng0@libertad.pw> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * 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