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

Function TestToTable

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

Source from the content-addressed store, hash-verified

207}
208
209func TestToTable(t *testing.T) {
210 L := NewState()
211 defer L.Close()
212 L.Push(LNumber(10))
213 L.Push(LString("99.9"))
214 L.Push(L.NewTable())
215 errorIfFalse(t, L.ToTable(1) == nil, "index 1 must be nil")
216 errorIfFalse(t, L.ToTable(2) == nil, "index 2 must be nil")
217 errorIfNotEqual(t, L.Get(3), L.ToTable(3))
218}
219
220func TestToFunction(t *testing.T) {
221 L := NewState()

Callers

nothing calls this directly

Calls 10

LNumberTypeAlias · 0.85
LStringTypeAlias · 0.85
errorIfFalseFunction · 0.85
errorIfNotEqualFunction · 0.85
NewStateFunction · 0.70
PushMethod · 0.65
CloseMethod · 0.45
NewTableMethod · 0.45
ToTableMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…