[dmd-internals] dmd commit, revision 657

Brad Roberts braddr at puremagic.com
Thu Sep 2 11:07:46 PDT 2010


On 9/2/2010 5:16 AM, Jason House wrote:
> The practice of commenting out unit tests is generally a bad idea.
> Historically, I've seen it done a lot in Phobos. It's bad because such tests
> are easily forgotten about.
> 
> NUnit has the [Ignore] attribute. Other test suites have expected failures.
> The basic idea is to leave tests that fail due to a legitimate bug such that
> the overall result is success but the details still show the problems.
> 
> As an example, cruise control with NUnit would colorize status bars based on
> what fraction of tests were success, failure, or ignored. (green, red, and
> yellow respectively)
> 
> I'll get off my soap box now...

I agree.  However, in this case, disabling the tests and turning on an extra
level of tightness in error checking of the test suite was a net improvement.

At the same time I disabled those three tests, I made it so that any
'fail_compilation' test that causes the compiler to crash (segv, abort, etc..
any signal) to fail the test.  The three tests that caused the compiler to crash
all have bugs filed for them and all have patches pending.

Anyway.. I considered adding something to do more formal disabling, but I hate
disable tests more than that would indicate.  I don't want to even have the
mechanism.

Later,
Brad


More information about the dmd-internals mailing list