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

Function TestToChannel

state_test.go:242–252  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

240}
241
242func TestToChannel(t *testing.T) {
243 L := NewState()
244 defer L.Close()
245 L.Push(LNumber(10))
246 L.Push(LString("99.9"))
247 var ch chan LValue
248 L.Push(LChannel(ch))
249 errorIfFalse(t, L.ToChannel(1) == nil, "index 1 must be nil")
250 errorIfFalse(t, L.ToChannel(2) == nil, "index 2 must be nil")
251 errorIfNotEqual(t, ch, L.ToChannel(3))
252}
253
254func TestObjLen(t *testing.T) {
255 L := NewState()

Callers

nothing calls this directly

Calls 9

LNumberTypeAlias · 0.85
LStringTypeAlias · 0.85
LChannelTypeAlias · 0.85
errorIfFalseFunction · 0.85
errorIfNotEqualFunction · 0.85
NewStateFunction · 0.70
PushMethod · 0.65
CloseMethod · 0.45
ToChannelMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…