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

Function TestTableLen

table_test.go:15–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13}
14
15func TestTableLen(t *testing.T) {
16 tbl := newLTable(0, 0)
17 tbl.RawSetInt(10, LNil)
18 tbl.RawSetInt(9, LNumber(10))
19 tbl.RawSetInt(8, LNil)
20 tbl.RawSetInt(7, LNumber(10))
21 errorIfNotEqual(t, 9, tbl.Len())
22
23 tbl = newLTable(0, 0)
24 tbl.Append(LTrue)
25 tbl.Append(LTrue)
26 tbl.Append(LTrue)
27 errorIfNotEqual(t, 3, tbl.Len())
28}
29
30func TestTableLenType(t *testing.T) {
31 L := NewState(Options{})

Callers

nothing calls this directly

Calls 6

newLTableFunction · 0.85
LNumberTypeAlias · 0.85
errorIfNotEqualFunction · 0.85
AppendMethod · 0.80
RawSetIntMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…