[darcs-users] Improving tests

Trent W. Buck trentbuck at gmail.com
Mon Mar 23 22:52:17 UTC 2009


Reinier Lamers <tux_rocker at reinier.de> writes:
> [...] we could rewrite the unit tests in Haskell.

I thought they were already written in Haskell (specifically, as
quickcheck functions).

> * It should be easier to make unit tests. There should be more
> documentation on how to add unit tests, and it should be clear when
> and where you should add a unit test. Currently, unit tests are thrown
> into a big file in src/unit.lhs that also contains the test driver. We
> could craft a hierarchical file tree for the tests that reflects the
> module tree of the actual code, and use a third-party driver from
> hackage.

Is it a good idea to put unit tests near the function they're testing,
as we do with haddock documentation?

> * Effectiveness. Of course, we have tests to catch bugs. But do they?
> I don't see it happening that often. Is it because the coverage is too
> low?

It's because nobody ever runs them because they take so damn long.



More information about the darcs-users mailing list