Good evening everyone
Suppose your code has the following statement:
if (string ends with char 'y') {
if ((char before last is not 'e') || (char before last is not 'a')) {
return (something awesome);
}
}
So that’s simple enough i thought …
Test1:
input = “xy” (last char is y, char before last is not e or a)
Result – partial coverage …
What other tests i am missing? If this was and && instead of ||, i suppose test would be far easier, but || confused me a bit.
Can you suggest Test2,3,n?
Thank you
You want to test for the expected behavior with inputs “ey” and “ay”.
You may find that your method is not doing quite what you think it is. I think
||has indeed confused you a bit.