MCPcopy Create free account
hub / github.com/google/gapid / TestInvokeMethod

Function TestInvokeMethod

core/java/jdbg/jdbg_test.go:99–115  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

97}
98
99func TestInvokeMethod(t *testing.T) {
100 assert := assert.To(t)
101 err := jdbg.Do(conn, thread, func(j *jdbg.JDbg) error {
102 calcTy := j.Class("Calculator")
103
104 calc := calcTy.New()
105 for _, i := range []int{3, 6, 8} {
106 calc.Call("Add", i)
107 }
108
109 res := calc.Call("Result").Get()
110 assert.For("res").That(res).Equals(3 + 6 + 8)
111 return nil
112 })
113 assert.For("err").That(err).Equals(nil)
114
115}

Callers

nothing calls this directly

Calls 8

ClassMethod · 0.80
ThatMethod · 0.80
ForMethod · 0.80
DoMethod · 0.65
NewMethod · 0.65
CallMethod · 0.65
GetMethod · 0.65
EqualsMethod · 0.65

Tested by

no test coverage detected