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

Function TestCheckBool

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

Source from the content-addressed store, hash-verified

58}
59
60func TestCheckBool(t *testing.T) {
61 L := NewState()
62 defer L.Close()
63 errorIfGFuncNotFail(t, L, func(L *LState) int {
64 L.Push(LTrue)
65 errorIfNotEqual(t, true, L.CheckBool(2))
66 L.Push(LNumber(10))
67 L.CheckBool(3)
68 return 0
69 }, "boolean expected, got number")
70}
71
72func TestCheckTable(t *testing.T) {
73 L := NewState()

Callers

nothing calls this directly

Calls 7

errorIfGFuncNotFailFunction · 0.85
errorIfNotEqualFunction · 0.85
LNumberTypeAlias · 0.85
CheckBoolMethod · 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…