On Fri, 21 Jun 2013 21:11:51 +0200, Walter Bright <[email protected]> wrote:

Whether you write the unit tests before, during, or after the module is written is irrelevant.

I mostly agree with this, but there is one reason to write tests before
implementing - you don't know the code yet. This way you don't filter out
stuff that you think is unnecessary because you know the code handles it.

Of course, the converse is also true - write tests after writing the code,
because you then know the code and have a better idea of what the corner
cases are.

--
Simen

Reply via email to