Skip to content

Clock exercise improvements #166

@kytrinyx

Description

@kytrinyx

I've been reviewing a lot of submissions for the Go implementation of Clock, and I'm seeing a few interesting edge cases:

  1. Sometimes there's mutation happening in the display method instead of the add, so you might have two copies of clock that are identical, add 1440 minutes to one, 2880 minutes to the other, and now they display the same value, but are not equal.
  2. They only account for one adjustment in either direction, meaning that if someone said add 1,000,000 minutes, then the clock would not end up with a valid display time.

I think that we should have test cases that go much father outside of the valid values, and I also think that we should test equality after adding values.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions