MCPcopy Index your code
hub / github.com/yuin/gopher-lua / TestCheckChannel

Function TestCheckChannel

auxlib_test.go:124–135  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

122}
123
124func TestCheckChannel(t *testing.T) {
125 L := NewState()
126 defer L.Close()
127 errorIfGFuncNotFail(t, L, func(L *LState) int {
128 ch := make(chan LValue)
129 L.Push(LChannel(ch))
130 errorIfNotEqual(t, ch, L.CheckChannel(2))
131 L.Push(LString("aaa"))
132 L.CheckChannel(3)
133 return 0
134 }, "channel expected, got string")
135}
136
137func TestCheckType(t *testing.T) {
138 L := NewState()

Callers

nothing calls this directly

Calls 8

errorIfGFuncNotFailFunction · 0.85
LChannelTypeAlias · 0.85
errorIfNotEqualFunction · 0.85
LStringTypeAlias · 0.85
CheckChannelMethod · 0.80
NewStateFunction · 0.70
PushMethod · 0.65
CloseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…