(t *testing.T)
| 198 | } |
| 199 | |
| 200 | func TestPullTableFromLua(t *testing.T) { |
| 201 | |
| 202 | for _, tt := range fromLuaRecTT { |
| 203 | want, code := tt.want, tt.code |
| 204 | l := lua.NewState() |
| 205 | |
| 206 | var got interface{} |
| 207 | var err error |
| 208 | |
| 209 | l.Register("pullTable", func(l *lua.State) int { |
| 210 | got, err = util.PullTable(l, 1) |
| 211 | return 0 |
| 212 | }) |
| 213 | lua.LoadString(l, code) |
| 214 | l.Call(0, 0) |
| 215 | |
| 216 | if err != nil { |
| 217 | t.Fatalf("pulling table, %v", err) |
| 218 | } |
| 219 | |
| 220 | if !reflect.DeepEqual(want, got) { |
| 221 | t.Fatalf("maps are not equal, expected %v, got %v", want, got) |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | } |
| 226 | |
| 227 | func TestPullTableWithArraysFromLua(t *testing.T) { |
| 228 | require := func(l *lua.State) { |
nothing calls this directly
no test coverage detected