Re: [Haskell-cafe] Zero-arity tests in QuickCheck and displaying expected result

2007-04-17 Thread Ketil Malde
On Mon, 2007-04-16 at 22:17 +0100, Joel Reymont wrote: On Apr 16, 2007, at 10:11 PM, Lennart Augustsson wrote: Why can't you just do 'f 1 2 3 == (4, 5, 6, 7)' to test f? That's what HUnit does but it's enticing to be able to standardize on QuickCheck for all of your testing. Prelude

Re: [Haskell-cafe] Zero-arity tests in QuickCheck and displaying expected result

2007-04-17 Thread Joel Reymont
On Apr 17, 2007, at 9:31 AM, Ketil Malde wrote: Prelude Test.QuickCheck let prop0 = List.sort [3,2,1] == [1,2,3] in quickCheck prop0 OK, passed 100 tests. My point is to be able to see that result generated was X and that it did not match expected Y, where both X and Y are printed out.

[Haskell-cafe] Zero-arity tests in QuickCheck and displaying expected result

2007-04-16 Thread Joel Reymont
On Apr 16, 2007, at 9:29 PM, Donald Bruce Stewart wrote: It's interesting to note that QuickCheck generalises unit testing: zero-arity QC properties are exactly unit tests. I don't think this works very well. I rely quite heavily on being able to compare expected output with test results

Re: [Haskell-cafe] Zero-arity tests in QuickCheck and displaying expected result

2007-04-16 Thread Lennart Augustsson
Why can't you just do 'f 1 2 3 == (4, 5, 6, 7)' to test f? On Apr 16, 2007, at 22:08 , Joel Reymont wrote: On Apr 16, 2007, at 9:29 PM, Donald Bruce Stewart wrote: It's interesting to note that QuickCheck generalises unit testing: zero-arity QC properties are exactly unit tests. I don't

Re: [Haskell-cafe] Zero-arity tests in QuickCheck and displaying expected result

2007-04-16 Thread Joel Reymont
That's what HUnit does but it's enticing to be able to standardize on QuickCheck for all of your testing. On Apr 16, 2007, at 10:11 PM, Lennart Augustsson wrote: Why can't you just do 'f 1 2 3 == (4, 5, 6, 7)' to test f? -- http://wagerlabs.com/