|
|
|
|
|
by twanvl
1955 days ago
|
|
> I'd be interested to see what a sufficiently strong QuickCheck specification of this problem would look like. I would write something like this in haskell: spec :: [Integer] -> Property
spec xs =
length xs <= 2 ==> fun (intercalate "," (map show xs)) == sum xs
This captures the three requirements, but not the implicit fourth requirement that the function throws an exception for other inputs. |
|