◐ Shell
clean mode source ↗

Lower bounds checking on IntList `get` method

[[Reserved for Mark Sherman's Class]]

In https://github.com/processing/processing4/blob/main/core/src/processing/data/IntList.java#L166-L171

We are not doing a lower bounds check on index. We don't know what would happen with negative indices.

  1. Please write a test to see what happens when there is a negative index,
  2. Update the test to check if we do the "right-thing" in that case (probably an exception? please figure it out! (or discuss with me :) ))
  3. Update the code to make the test pass!