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

Function TestTableRemove

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

Source from the content-addressed store, hash-verified

119}
120
121func TestTableRemove(t *testing.T) {
122 tbl := newLTable(0, 0)
123 errorIfNotEqual(t, LNil, tbl.Remove(10))
124 tbl.Append(LTrue)
125 errorIfNotEqual(t, LNil, tbl.Remove(10))
126
127 tbl.Append(LFalse)
128 tbl.Append(LTrue)
129 errorIfNotEqual(t, LFalse, tbl.Remove(2))
130 errorIfNotEqual(t, 2, tbl.MaxN())
131 tbl.Append(LFalse)
132 errorIfNotEqual(t, LFalse, tbl.Remove(-1))
133 errorIfNotEqual(t, 2, tbl.MaxN())
134
135}
136
137func TestTableRawSetInt(t *testing.T) {
138 tbl := newLTable(0, 0)

Callers

nothing calls this directly

Calls 5

newLTableFunction · 0.85
errorIfNotEqualFunction · 0.85
AppendMethod · 0.80
MaxNMethod · 0.80
RemoveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…