Yeah, I did the same thing with tests. Wrote about ten of them and rigged the suite to scream "YOU FAIL" at me without even printing the line number. Couldn't believe it when they all passed on the first try :-)
Did you consider that comparing floating point numbers with '==' doesn't make much sense?
No. What do you propose? Use some sort of "comparison tolerance"?
I think I'd have a different implementation for floats that would return the nearest two it's between, and punt the tolerance decision up a level to the calling code.
I got made a moderator recently, and noticed that I have the amazing ability to ban my own comments. For added efficiency/hilarity I can even do it from my own user page, now complete with nifty "ban" links! I thought it would be neat to publicize this bug before it gets fixed, because it makes for a wonderful example of specification failure - the kind of error that can doom any attempt to create AGI/FAI. How do you protect against such mistakes in general, if you're not allowed to test your software? Discuss.
Tangentially related: a blogger asks visitors to write a correct binary search routine without testing it even once, then test it and report the results. Much wailing ensues. (I succeeded - look for "Vladimir Slepnev" - but it was a surreal experience.)