Open suoyi123wang opened 2 years ago
If binaryRepresentation
has length 7, then the last accessible index is 6, so the binaryRepresentation[7] & 255
will throw an ArrayOutOfBoundsException
when the length is exactly 7.
In Java, array indexes go from 0 to array.length - 1
Although I think that EvoSuite should generate a test saying that calling ofClassFile(a)
with a
an array of size 7, is expected to throw an exception.
for the method ofClassFile![image](https://user-images.githubusercontent.com/44200574/143535426-7f211e04-61f4-40c8-878b-623a6fc3973d.png)
we generate a unit test for it![image](https://user-images.githubusercontent.com/44200574/143535564-0703257a-58b1-4c78-9c2b-ef7e4c2a2736.png)