Brian's Waste of Time

Tue, 16 Mar 2004

public class Foo implements Broken

I tend to be a big fan of quasi-literate programming where the code is at least obvious in what it does. The Broken tag interface came up today, and I love it. It is just an empty interface that you have a class implement when you know it is broken, but need to check it in anyway =)

Where it came up was in a discussion about my practice of writing test cases that are designed to pass if a known-bug which is not going to be fixed yet is allowed to stay in a source tree. The test passes if the bug still exists, fails if the bug has been fixed (so that we know -- this is typically done to document bugs in 3rd party libraries). The benefits of doing this compared to maintaining a seperate src/bugs set of tests which are known to fail wre under discussion (and being determined to be a hack). Instead the suggestion to use a tag to indicate the test is a known and acceptable bug is preferred -- hence implements Broken.

3 writebacks [/src/java] permanent link