3 ms·
I am not sure why you sound so angry, but let me try to explain: Every time you build in an assertion like that you should have a test case to prove the program
by iSnow 14y ago
I am not sure why you sound so angry, but let me try to explain: Every time you build in an assertion like that you should have a test case to prove the program handles it like you intended it to.
And concerning the Java FP bug: yes, someone forgot to test the corner cases of the Java FP range.
You don't need to test every FP number out there, but you absolutely need the highest, lowest, highest+1, lowest+1, zero, +/-infinity, division by zero and if you are good highest +0, lowest + 0 and some conversions from and to long, int etc.