Skip to content

assert: invalid memory address or nil pointer dereference for assert.Error on darwin/arm64 #1655

Closed Answered by brackendawson
samanhappy asked this question in Q&A
Discussion options

You must be logged in to vote

Precisely, eg:

func assertError(t *testing.T, err error, msg string) {
	t.Helper()
	if assert.Error(t, err) {
		assert.Equal(t, msg, err.Error())
	}
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@brackendawson
Comment options

Answer selected by samanhappy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants
Converted from issue

This discussion was converted from issue #1596 on October 04, 2024 17:28.