Open bobheadxi opened 5 years ago
according to the official documentation, what you expect should come first, and what you actually get should come second:
so assert statements like:
assert.Equal(t, tss.tick0.Year(), 1969)
should actually be:
assert.Equal(t, 1969, tss.tick0.Year())
otherwise, you get mildly misleading output:
Error Trace: ticks_test.go:210 Error: Not equal: expected: 1970 actual : 1969 Test: TestTicksSinceStartConsumeZero
^^^ what that should actually say is:
Error Trace: ticks_test.go:210 Error: Not equal: expected: 1969 actual : 1970 Test: TestTicksSinceStartConsumeZero
Yes, this is rooted in my experience with other testing frameworks where the arguments order is not Yoda-style. It would be nice to change everywhere, but the amount of required boring work has always stopped me.
according to the official documentation, what you expect should come first, and what you actually get should come second:
so assert statements like:
should actually be:
otherwise, you get mildly misleading output:
^^^ what that should actually say is: