And on v1.8.4 it correctly fails, but on master it incorrectly passes.
This is a regression introduced by #1464. time.Time.Equal does not mean the two instances are equal, it means they represent the same instant. There is more information contained in a time.Time instance than the instant, this regression makes it impossible to test for state which is a best practice. If the user only cares about the instant represented then WithinDuration(t, expected, actual, 0) is available.
This test should not pass:
And on v1.8.4 it correctly fails, but on master it incorrectly passes.
This is a regression introduced by #1464. time.Time.Equal does not mean the two instances are equal, it means they represent the same instant. There is more information contained in a time.Time instance than the instant, this regression makes it impossible to test for state which is a best practice. If the user only cares about the instant represented then
WithinDuration(t, expected, actual, 0)
is available.