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

Function TestTableRawGetH

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

Source from the content-addressed store, hash-verified

166}
167
168func TestTableRawGetH(t *testing.T) {
169 tbl := newLTable(0, 0)
170 errorIfNotEqual(t, LNil, tbl.RawGetH(LNumber(1)))
171 errorIfNotEqual(t, LNil, tbl.RawGetH(LString("key0")))
172 tbl.RawSetH(LString("key0"), LTrue)
173 tbl.RawSetH(LString("key1"), LFalse)
174 tbl.RawSetH(LNumber(1), LTrue)
175 errorIfNotEqual(t, LTrue, tbl.RawGetH(LString("key0")))
176 errorIfNotEqual(t, LTrue, tbl.RawGetH(LNumber(1)))
177 errorIfNotEqual(t, LNil, tbl.RawGetH(LString("notexist")))
178 errorIfNotEqual(t, LNil, tbl.RawGetH(LTrue))
179}
180
181func TestTableForEach(t *testing.T) {
182 tbl := newLTable(0, 0)

Callers

nothing calls this directly

Calls 6

newLTableFunction · 0.85
errorIfNotEqualFunction · 0.85
LNumberTypeAlias · 0.85
LStringTypeAlias · 0.85
RawGetHMethod · 0.80
RawSetHMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…