Re: [Haskell-cafe] Zero-arity tests in QuickCheck and displaying expected result
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 Test.QuickCheck let prop0 = List.sort [3,2,1] == [1,2,3] in quickCheck prop0 OK, passed 100 tests. -k ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Zero-arity tests in QuickCheck and displaying expected result
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. -- http://wagerlabs.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Zero-arity tests in QuickCheck and displaying expected result
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 and QC does not seem to provide for this feature when tests are zero arity. Am I missing something? Thanks, Joel -- http://wagerlabs.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Zero-arity tests in QuickCheck and displaying expected result
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 think this works very well. I rely quite heavily on being able to compare expected output with test results and QC does not seem to provide for this feature when tests are zero arity. Am I missing something? Thanks, Joel -- http://wagerlabs.com/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Zero-arity tests in QuickCheck and displaying expected result
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/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe