Skip to content

chore: assert statements mostly use wrong arg order #246

Open
@bobheadxi

Description

@bobheadxi

according to the official documentation, what you expect should come first, and what you actually get should come second:

image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions