News for hackers. Stuff that matters.
Re:Preconditions Should be Checked Explicitly by thethomaseffect on Tuesday April 02, 2013 @09:24AM (#5479092)
Good article as usual, I'd argue that in TDD preconditions are absolutely critical because otherwise your tests cannot possibly be considered complete. At the end of the day preconditions usually amount to if (valid) continue else throw

If they did turn out to be a bottleneck in the future then modifying or even removing them shouldn't affect visible behavior.

Re:Preconditions Should be Checked Explicitly by Strilanc on Tuesday April 02, 2013 @10:03AM (#5479297)
Yes, tests are a good way to ensure the behavior of invalid cases stays consistent.