|
|
|
|
|
by latchkey
368 days ago
|
|
We're not testing Java, we're testing your code which is a method to add items to a list. If it passes the tests, great. If there is a bug in the JVM, maybe it picks it up or doesn't. That doesn't negate the need for the test. The way I look at testing is less about the current point in time. It is about changes over time. If someone else comes along and changes the underlying implementation to a list where sort order is not guaranteed (maybe thinking their version is faster or something), then the tests will fail and that's exactly what you want. You're testing the expected behavior over time and right now, the expected behavior is a sorted list. Regardless, I don't understand what you're trying to argue or prove here. Yes, testing is hard and not easily won, I already said that. |
|
I am arguing against your claim that this particular suggestion is feasible for anything but toy projects.