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

Function TestToInt64

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

Source from the content-addressed store, hash-verified

174}
175
176func TestToInt64(t *testing.T) {
177 L := NewState()
178 defer L.Close()
179 L.Push(LNumber(10))
180 L.Push(LString("99.9"))
181 L.Push(L.NewTable())
182 errorIfNotEqual(t, int64(10), L.ToInt64(1))
183 errorIfNotEqual(t, int64(99), L.ToInt64(2))
184 errorIfNotEqual(t, int64(0), L.ToInt64(3))
185}
186
187func TestToNumber(t *testing.T) {
188 L := NewState()

Callers

nothing calls this directly

Calls 8

LNumberTypeAlias · 0.85
LStringTypeAlias · 0.85
errorIfNotEqualFunction · 0.85
NewStateFunction · 0.70
PushMethod · 0.65
CloseMethod · 0.45
NewTableMethod · 0.45
ToInt64Method · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…