Personal tools Home Log in Views Page Discussion View source History Jump to: navigation , search A quick introduction to QuickCheck, and testing Haskell code. See Introduction to QuickCheck2 for the QC2 version 1 Motivation 2 Keeping things pure 3 Testing with QuickCheck 4 Testing take5 5 Another property 6 Coverage 7 Going further 1 Motivation In September 2006, Bruno Martínez asked the following question: -- I've written a function that looks similar to this one getList = find 5 where find 0 = return [ ] find n = do ch <- getChar if ch ` elem ` [ 'a' .. 'e' ] then do tl <- find ( n - 1 ) return ( ch : tl ) else find n -- I want to test this function, without hitting the filesystem. In C++ I -- would use a istringstream. I couldn't find a function that returns a -- Handle from a String. The closer thing that may wor...