checksum/assert/assertion.go

13 lines
198 B
Go
Raw Normal View History

2023-08-01 15:32:05 +08:00
package assert
import (
"reflect"
"testing"
)
func Equals[T any](t *testing.T, got, want T) {
if !reflect.DeepEqual(got, want) {
errorf(t, "%s got %v, but want %v", t.Name(), got, want)
}
}