Re:Coverage is not strongly correlated with test suite effec...
by thaumasiotes on Tuesday September 28, 2021 @04:22AM
(#28680459)
Well, imagine two different analyses of the code:
1. Does each branch do the right thing?
2. Does the code go down the correct branch in the first place?
I've focused more on the first question, and you're focusing more on the second. But it's fair to say that each question is a reasonable focus of testing, which weakens my comment above.
Re:Coverage is not strongly correlated with test suite effec...
by Supermancho on Monday September 27, 2021 @10:19PM
(#28678583)
Depends on the language/type safety offered.
If your language has a NaN (javascript) and you can assert the expected behavior of x < NaN (false) or if you don't even want to encounter that, then you're able to reason back to the generation of the inputs. Wherever x and y came from, if there was a possibility of an NaN being a value, you want the generating function to exception or cast via some sort of validation before handing them off to other unsuspecting functions.
Expressions can have any number of edge cases that code coverage can't account for.