If you're a Java programmer and want to have a rude awakening, go download Jester. Jester is an automated mutation testing tool—it goes in and replaces “<=” with “<”, “&&” with “||”, “!” with whitespace. And then it re-runs the tests. And then you get to watch in horror as your tests still all pass, regardless of what the product code actually does.I've always wanted to write a unit-test testing library which inverts all of the assertions to catch the false positives.
This sounds like it's a lot more sadistic (and useful) though.