Monday, March 22, 2004

Implements broken

Brian McCallister posted a clever idea: mark your borken objects with the Broken interface to support testing for known bugs. When the test fails, you know the bug was unexpectedly fixed:

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.

No comments: