|
|
|
|
|
by nrinaudo
3478 days ago
|
|
Or, you know, write property-based tests instead, so you only need to worry about the logic and not the test values. I've always found that if you let the author of a piece of code decide on what value that code should be tested with, he'll test for the edge cases that he's thought of (and dealt with), not the ones that actually crash production. |
|
Usually, property-based tests are more complex, which means that the chance of an logic error in the test increases, and having something easy to verify hardcoded brings peace of mind.