Skip to content

High-Scores: add immutability test #1493

Closed
@rpottsoh

Description

@rpottsoh

I have a student that has written method personalTopThree and allowed it to mutate the original input data. There are presently no tests to confirm that latest will return the same result before and after personalTopThree is called.

This is the case I am proposing:

    {
      "description": "latest not affected by personalTopThree",
      "property": "latest",
      "input": {
        "scores": [10, 30, 90, 30, 100, 20, 10, 0, 30, 40, 40, 70, 70, 25]
      },
      "expected": 25
    }

Is this a reasonable behavior to expect of personalTopThree?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions