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.
28 lines
465 B
28 lines
465 B
package require
|
|
|
|
import (
|
|
"reflect"
|
|
"testing"
|
|
)
|
|
|
|
func Equal(t *testing.T, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
|
|
t.Helper()
|
|
|
|
if reflect.DeepEqual(expected, actual) {
|
|
return
|
|
}
|
|
|
|
t.Error(msgAndArgs...)
|
|
t.FailNow()
|
|
}
|
|
|
|
func Equalf(t *testing.T, expected interface{}, actual interface{}, msg string, args ...interface{}) {
|
|
t.Helper()
|
|
|
|
if reflect.DeepEqual(expected, actual) {
|
|
return
|
|
}
|
|
|
|
t.Errorf(msg, args...)
|
|
t.FailNow()
|
|
}
|
|
|