Well it's possible, but how many developer would rather make a new type for using the first ten integer instead of just using int?
I think random testing is a good way to get almost exhaustively tests.
I think random testing is a good way to get almost exhaustively tests.
> I think random testing is a good way to get almost exhaustively tests.
I think that testing known/predictable edge and corner cases makes more sense (in some cases), but I also think that I was responding to a comment about the impossibility of using tests to prove correctness of a function, not about how to derive practical benefits despite theoretical limitations.
You are right, you can use tests to prove a function if - the function has very limited arguments and - the function is pure or does very limited amount of state change(side effect)
Generally speaking tests are not the right tool for proving program correctness.