by haberman · 5y ago · 0 comments
Also, while there are only 2^64 distinct double values, there are many more string representations than that. For example, "1" and "1.0" are the same underlying value, but a parser needs to be able to handle both.
unit testing doesn't mean that all possible values have to be tested. usually it's about code paths, i.e. standard, error and edge cases.
In this particular case, I would have tested 2^N where N>32 random, unique values, at a minimum.
Of course, it depends on who the customer is. Some customers can tolerate a few bugs here and there; and some would incur million dollar losses.