Skip to content

Lower bounds checking on IntList get method #1415

@catilac

Description

@catilac

[[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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Reserved: ECThis is reserved for Emmanuel College CS students

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions