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

Function TestCheckTable

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

Source from the content-addressed store, hash-verified

70}
71
72func TestCheckTable(t *testing.T) {
73 L := NewState()
74 defer L.Close()
75 errorIfGFuncNotFail(t, L, func(L *LState) int {
76 tbl := L.NewTable()
77 L.Push(tbl)
78 errorIfNotEqual(t, tbl, L.CheckTable(2))
79 L.Push(LNumber(10))
80 L.CheckTable(3)
81 return 0
82 }, "table expected, got number")
83}
84
85func TestCheckFunction(t *testing.T) {
86 L := NewState()

Callers

nothing calls this directly

Calls 8

errorIfGFuncNotFailFunction · 0.85
errorIfNotEqualFunction · 0.85
LNumberTypeAlias · 0.85
CheckTableMethod · 0.80
NewStateFunction · 0.70
PushMethod · 0.65
CloseMethod · 0.45
NewTableMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…