3 Dec 05:54
QuickCheck properties for IntSet
From: David Benbennick <dbenbenn <at> gmail.com>
Subject: QuickCheck properties for IntSet
Newsgroups: gmane.comp.lang.haskell.libraries
Date: 2007-12-03 04:56:38 GMT
Subject: QuickCheck properties for IntSet
Newsgroups: gmane.comp.lang.haskell.libraries
Date: 2007-12-03 04:56:38 GMT
Here's a patch to IntSet.hs that adds many QuickCheck properties. It adds properties testing almost all of the public interface of IntSet, and also properties testing that the data type invariants are never broken. (The patch doesn't test the Data, Eq, Monoid, Read, or Typeable instances.) Also, this patch removes a helper function, foldlStrict, and replaces it with calls to Data.List.foldl'. I have two questions: 1) Is this the right way to submit patches? 2) Is there a good reason that IntSet doesn't use "deriving Eq", and instead manually implements the Eq instance?
New patches:
[IntSet QuickCheck properties
David Benbennick <dbenbenn <at> gmail.com>**20071203040728
1) Remove foldlStrict, and use Data.List.foldl' instead.
2) Add many QuickCheck properties, checking almost
every exported function of IntSet.
] {
hunk ./Data/IntSet.hs 114
-import List (nub,sort)
-import qualified List
hunk ./Data/IntSet.hs 115
(Continue reading)
RSS Feed