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

Function TestToInt

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

Source from the content-addressed store, hash-verified

163}
164
165func TestToInt(t *testing.T) {
166 L := NewState()
167 defer L.Close()
168 L.Push(LNumber(10))
169 L.Push(LString("99.9"))
170 L.Push(L.NewTable())
171 errorIfNotEqual(t, 10, L.ToInt(1))
172 errorIfNotEqual(t, 99, L.ToInt(2))
173 errorIfNotEqual(t, 0, L.ToInt(3))
174}
175
176func TestToInt64(t *testing.T) {
177 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
ToIntMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…