(t *testing.T)
| 13 | } |
| 14 | |
| 15 | func 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 | |
| 30 | func TestTableLenType(t *testing.T) { |
| 31 | L := NewState(Options{}) |