Again, there is a misconception that test prove that a given module works. No, they don't.
Test may serve as some kind of "persistent REPL" to make sure you didn't miss some edge case. But, at least to me, the real value of tests is confidence for refactoring.
Otherwise it is so easy to "simplify" a function but break code due to some implicit type cast, or making it work only for positive values, etc.
Test may serve as some kind of "persistent REPL" to make sure you didn't miss some edge case. But, at least to me, the real value of tests is confidence for refactoring.
Otherwise it is so easy to "simplify" a function but break code due to some implicit type cast, or making it work only for positive values, etc.