2 ms·
Also, assertions only flag code that gets executed when you test it. Unless you can be sure that you have tested every possible execution possibility before shi
by TwoBit 13y ago
Also, assertions only flag code that gets executed when you test it. Unless you can be sure that you have tested every possible execution possibility before shipping, you cannot know if after shipping your code will execute something that you missed during testing. This happens a lot.
Additionally, the unit tests allow me to safely maintain the code from the comfort of my own desk. If I relied only on assertions then I would literally have to send changes to all possible users and ask each of them to please test and tell me if they got any assertions. And do this for me three times a week for the next two years.
- mempko 13y agoWho said only?