MCPcopy
hub / github.com/gopherjs/gopherjs / TestBool

Function TestBool

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

Source from the content-addressed store, hash-verified

52})`)
53
54func TestBool(t *testing.T) {
55 e := true
56 o := dummys.Get("someBool")
57 if v := o.Bool(); v != e {
58 t.Errorf("expected %#v, got %#v", e, v)
59 }
60 if i := o.Interface().(bool); i != e {
61 t.Errorf("expected %#v, got %#v", e, i)
62 }
63 if dummys.Set("otherBool", e); dummys.Get("otherBool").Bool() != e {
64 t.Fail()
65 }
66}
67
68func TestStr(t *testing.T) {
69 e := "abc\u1234"

Callers

nothing calls this directly

Calls 4

GetMethod · 0.65
BoolMethod · 0.45
InterfaceMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…