I've been reviewing a lot of submissions for the Go implementation of Clock, and I'm seeing a few interesting edge cases:
- 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.
- 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.
I've been reviewing a lot of submissions for the Go implementation of Clock, and I'm seeing a few interesting edge cases:
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.