On 3/13/06, Simon Peyton-Jones <[EMAIL PROTECTED]> wrote:
> | > > There are no serious quickchecks in the testsuite. I found just
> one
> | > > entry that didn't test the standard libraries: "prop_silly xs =
> head
> | > > xs == head xs". Now how can that be when QuickCheck is so
> incredibly
> | > > useful?
> | >
> | > look in lib/Concurrent, eg. Chan001, MVar001.
> |
> | Those aren't GHC tests. They test the standard library.
>
> It's possible that there's a misunderstanding here.
>
> The testsuite tests GHC as a *black box*; all you can do is invoke it,
> giving lots of different Haskell programs as input, which is what the
> testsuite does.  In principle, it would also be possible to write
> Quickcheck tests for particular functions inside GHC.  For example, the
> UniqFM data types could have a lot of Quickcheck tests; and one could
> imagine many, many more.  These tests can't obviously be done by running
> the GHC binary.  Instead, one would need to link *part* of GHC with the
> test program, and run the test program as 'main'.  We don't have any
> 'make' technology to do that yet.
>
> If Lemmih has this in mind (and perhaps it is -- you say "I want to test
> the core of GHC"), then maybe ghc/tests is the right place.  But if you
> have in mind black-box tests of the compiled binary, then I agree that
> fptools/testsuite is the right place (perhaps using Quickcheck as the
> technology).

Yes, exactly. I want to test the GHC library, not the GHC binary.

> Anyway, I thought it'd be good to get clear what you are trying to do,
> perhaps with a couple of examples.

The test set is currently testing:
 * that all extensions (from Language.Haskell.Extension) are parsed
correctly, and
 * that (options == getOptions (mkPragma options)) holds true.

Such tests are _very_ helpful but, as you said, don't easily fit in
with the black-box tests in the testsuite.

--
Friendly,
  Lemmih
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to