4 ms·
Now you understand - testing is extremely close to useless. You can't perfectly choose the test cases for code without looking at its implementation. And by tha
by amw-zero 5y ago
Now you understand - testing is extremely close to useless. You can't perfectly choose the test cases for code without looking at its implementation. And by that point, you are just testing the implementation and working backwards.
What you want is a specification of the behavior, and to verify that the implementation satisfies the specification. This will be proven in the general case, and then you don't need to think about individual cases.
- throwawaylinux 5y agoI don't think testing is close to useless, I think it has a lot of value but trying to prove general correctness with your test cases is a fool's errand. Adding test cases intelligently for tricky cases in the specification and/or implementation, hard-to-hit error conditions, or adding tests for bugs you previously fixed, etc is perfectly reasonable without doggedly chasing 100% coverage or 100% correctness. And yes I'm aware of formal methods, and agree they seem like the better way to go for proving.