MCPcopy
hub / github.com/gopherjs/gopherjs / TestSameFuncWrapper

Function TestSameFuncWrapper

tests/js_test.go:442–459  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

440}
441
442func TestSameFuncWrapper(t *testing.T) {
443 a := func(_ string) {} // string argument to force wrapping
444 b := func(_ string) {} // string argument to force wrapping
445 if !dummys.Call("isEqual", a, a).Bool() || dummys.Call("isEqual", a, b).Bool() {
446 t.Fail()
447 }
448 if !dummys.Call("isEqual", somePackageFunction, somePackageFunction).Bool() {
449 t.Fail()
450 }
451 if !dummys.Call("isEqual", (*T).someMethod, (*T).someMethod).Bool() {
452 t.Fail()
453 }
454 t1 := &T{}
455 t2 := &T{}
456 if !dummys.Call("isEqual", t1.someMethod, t1.someMethod).Bool() || dummys.Call("isEqual", t1.someMethod, t2.someMethod).Bool() {
457 t.Fail()
458 }
459}
460
461func somePackageFunction(_ string) {
462}

Callers

nothing calls this directly

Calls 2

BoolMethod · 0.45
CallMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…