MCPcopy Create free account
hub / github.com/yuin/gopher-lua / TestOptInt64

Function TestOptInt64

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

Source from the content-addressed store, hash-verified

187}
188
189func TestOptInt64(t *testing.T) {
190 L := NewState()
191 defer L.Close()
192 errorIfGFuncNotFail(t, L, func(L *LState) int {
193 errorIfNotEqual(t, int64(99), L.OptInt64(1, int64(99)))
194 L.Push(LNumber(10))
195 errorIfNotEqual(t, int64(10), L.OptInt64(2, int64(99)))
196 L.Push(LString("aaa"))
197 L.OptInt64(3, int64(99))
198 return 0
199 }, "number expected, got string")
200}
201
202func TestOptNumber(t *testing.T) {
203 L := NewState()

Callers

nothing calls this directly

Calls 8

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