You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
488 B

package assert
import (
"reflect"
"testing"
)
func Equal(t *testing.T, expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool {
t.Helper()
if reflect.DeepEqual(expected, actual) {
return true
}
t.Error(msgAndArgs...)
return false
}
func Equalf(t *testing.T, expected interface{}, actual interface{}, msg string, args ...interface{}) bool {
t.Helper()
if reflect.DeepEqual(expected, actual) {
return true
}
t.Errorf(msg, args...)
return false
}