|
|
|
|
|
by dschuessler
1877 days ago
|
|
Who would actually write tests like this in real life? Does anyone out there actually test their polynomials with a random sample of input values? Yes, in a technical sense they are tests. But they are bad tests precisely because they barely fulfill the purpose to clarify the behavior of the function. I’m not convinced. |
|
1. The actual specification is sometimes better reflected by the implementation than by some test cases. 2. Some test cases don't help you understanding what's supposed to be computed.
Of course, counterexamples could be made. Imagine a board game with a test function testing specific moves. Those test cases will help you understand the implementation a lot.