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

Function TestCheckThread

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

Source from the content-addressed store, hash-verified

109}
110
111func TestCheckThread(t *testing.T) {
112 L := NewState()
113 defer L.Close()
114 errorIfGFuncNotFail(t, L, func(L *LState) int {
115 th, _ := L.NewThread()
116 L.Push(th)
117 errorIfNotEqual(t, th, L.CheckThread(2))
118 L.Push(LNumber(10))
119 L.CheckThread(3)
120 return 0
121 }, "thread expected, got number")
122}
123
124func TestCheckChannel(t *testing.T) {
125 L := NewState()

Callers

nothing calls this directly

Calls 8

errorIfGFuncNotFailFunction · 0.85
errorIfNotEqualFunction · 0.85
LNumberTypeAlias · 0.85
CheckThreadMethod · 0.80
NewStateFunction · 0.70
PushMethod · 0.65
CloseMethod · 0.45
NewThreadMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…