4 ms·
Your comment is confusing. What is the difference between "code correctness" and "to show that the result of a function is correct for all input parameters"? I
by nmrm2 11y ago
Your comment is confusing.
What is the difference between "code correctness" and "to show that the result of a function is correct for all input parameters"? In common parlance these are the same thing.
Also, what does it even mean for a piece of code to be sound or complete? Sound with respect to what? Complete with respect to or relative to what?
I think the words that you want are "correct wrt a specification" instead of sound and "total" instead of complete?
Testing cannot prove correctness, period. The proof is a set of unit tests that cover every single input and also a proof that the set of inputs you tested is the entire domain. Basically no in-the-wild unit testing does even the former.
What you mean to say, I think, is, "testing is indispensable when your specification language isn't sufficient for specifying all correctness properties for your code."
Which is about right, but the way that you worded this post was extraordinarily confusing.