MCPcopy Create free account
hub / github.com/Shopify/go-lua / expectDeepEqual

Function expectDeepEqual

parser_test.go:94–103  ·  view source on GitHub ↗
(t *testing.T, x, y interface{}, m string)

Source from the content-addressed store, hash-verified

92}
93
94func expectDeepEqual(t *testing.T, x, y interface{}, m string) bool {
95 if reflect.DeepEqual(x, y) {
96 return true
97 }
98 if reflect.TypeOf(x).Kind() == reflect.Slice && reflect.ValueOf(y).Len() == 0 && reflect.ValueOf(x).Len() == 0 {
99 return true
100 }
101 t.Errorf("%s doesn't match: %v, %v\n", m, x, y)
102 return false
103}
104
105func compareClosures(t *testing.T, a, b *luaClosure) {
106 expectEqual(t, a.upValueCount(), b.upValueCount(), "upvalue count")

Callers 1

comparePrototypesFunction · 0.85

Calls 2

TypeOfMethod · 0.80
LenMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…