On Thu, Oct 07, 1999 at 07:19:27PM +0200, Lars Gullik Bjønnes wrote:
> Allan Rae <[EMAIL PROTECTED]> writes:
>
> | Unit-testing is certainly a good thing -- tests all those promises the
> | code makes and keeps Arndt happy about programming by contract since the
> | interface can't change without everybody finding out.
>
> Unit-testing and independant modules is easy...unfortunately most of
> the modules in LyX depends on a multitude of other mudules makeing
> unit-testing very cumbersome and a lot of additional work.
Agreed. Unit testing a class in a vacuum can be highly cumbersome.
That's why you unit test the fundamental ones first, by themselves.
Unit tests of more complex classes simply use the fundamental ones and
assume that they are correct.
Also, you can't unit test *every* class. Where one can test, however,
one should.
> modules in the support dir could easily benefit form unit
> testing...but it is a lot of work to create the tests...
>
> And tests can be wrong too...
True. But once they're working, they save a great deal of time
finding and fixing future bugs...
This is one of those cases where the cost of the investment pays
itself back over time.
--
John Weiss