diff --git a/internal/assert/assert.go b/internal/assert/assert.go index 83cf38fedb0..65342e9662d 100644 --- a/internal/assert/assert.go +++ b/internal/assert/assert.go @@ -29,6 +29,9 @@ type Assert struct { t *testing.T } +// Equal will test that want == got, and call t.Fatal if it does not. +// Notably, for errors, they are equal if they are both nil, or are both non-nil. +// No value information is checked for errors. func Equal(t *testing.T, want, got interface{}) { t.Helper() Assert{t}.Equal(want, got)