An error that shows up in the "Compile" stage in the "Edit, Compile, [Link,] Run cycle".
The
TheoryOfLanguageEnvironmentSuckage states that it's better to have a mistake shown to you as soon as possible, hence making
CompileTimeErrors better than
RunTimeErrors.
However, Though
UnitTests technically happen at Run-time, they always happen in conjunction with compilation. This means they have the same quick feedback of
CompileTimeErrors. Think of
UnitTests as
CompileTimeErrors that the programmer can define.
That is an excellent point - and possibly the key to convincing people of the value of unit tests (and the antidote to certain criticisms of dynamic typing) --
JimArnold
CategoryTime