1
0
Fork 0
golang-github-editorconfig-.../internal/assert/assert.go
Daniel Baumann 2b08a89310
Adding upstream version 2.6.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-18 22:58:26 +02:00

22 lines
293 B
Go

package assert
import (
"testing"
"github.com/google/go-cmp/cmp"
)
func Equal(t *testing.T, x, y interface{}) {
t.Helper()
r := DiffReporter{}
if !cmp.Equal(x, y, cmp.Reporter(&r)) {
t.Error(r.String())
}
}
func Nil(t *testing.T, x interface{}) {
t.Helper()
Equal(t, x, nil)
}