MCPcopy Create free account
hub / github.com/Shopify/goluago / TestPullStringTableFromLua

Function TestPullStringTableFromLua

util/deep_pull_test.go:141–164  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

139}
140
141func TestPullStringTableFromLua(t *testing.T) {
142
143 for _, tt := range fromLuaTT {
144 want, code := tt.want, tt.code
145 l := lua.NewState()
146
147 var got map[string]string
148 var err error
149
150 l.Register("pull_table", func(l *lua.State) int {
151 got, err = util.PullStringTable(l, 1)
152 return 0
153 })
154 lua.LoadString(l, code)
155 l.Call(0, 0)
156
157 if err != nil {
158 t.Fatalf("pulling table, %v", err)
159 }
160
161 checkMaps(t, want, got)
162 }
163
164}
165
166var fromLuaRecTT = []struct {
167 want map[string]interface{}

Callers

nothing calls this directly

Calls 2

PullStringTableFunction · 0.92
checkMapsFunction · 0.85

Tested by

no test coverage detected