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

Function TestTableRawSetInt

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

Source from the content-addressed store, hash-verified

135}
136
137func TestTableRawSetInt(t *testing.T) {
138 tbl := newLTable(0, 0)
139 tbl.RawSetInt(MaxArrayIndex+1, LTrue)
140 errorIfNotEqual(t, 0, tbl.MaxN())
141 errorIfNotEqual(t, LTrue, tbl.RawGet(LNumber(MaxArrayIndex+1)))
142
143 tbl.RawSetInt(1, LTrue)
144 tbl.RawSetInt(3, LTrue)
145 errorIfNotEqual(t, 3, tbl.MaxN())
146 errorIfNotEqual(t, LTrue, tbl.RawGetInt(1))
147 errorIfNotEqual(t, LNil, tbl.RawGetInt(2))
148 errorIfNotEqual(t, LTrue, tbl.RawGetInt(3))
149 tbl.RawSetInt(2, LTrue)
150 errorIfNotEqual(t, LTrue, tbl.RawGetInt(1))
151 errorIfNotEqual(t, LTrue, tbl.RawGetInt(2))
152 errorIfNotEqual(t, LTrue, tbl.RawGetInt(3))
153}
154
155func TestTableRawSetH(t *testing.T) {
156 tbl := newLTable(0, 0)

Callers

nothing calls this directly

Calls 7

newLTableFunction · 0.85
errorIfNotEqualFunction · 0.85
LNumberTypeAlias · 0.85
MaxNMethod · 0.80
RawSetIntMethod · 0.45
RawGetMethod · 0.45
RawGetIntMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…