(t *testing.T)
| 231 | } |
| 232 | |
| 233 | func TestLuaGetOptsArray(t *testing.T) { |
| 234 | l := lua.NewState() |
| 235 | defer l.Close() |
| 236 | tbl := l.NewTable() |
| 237 | arr := l.NewTable() |
| 238 | tbl.RawSetString("a", arr) |
| 239 | arr.Append(lua.LNumber(10)) |
| 240 | arr.Append(lua.LNumber(20)) |
| 241 | ss := luaGetOptsArray(tbl, "a") |
| 242 | if len(ss) != 2 && ss[1] == "20" { |
| 243 | t.Error("Check opts array failed") |
| 244 | } |
| 245 | } |
nothing calls this directly
no test coverage detected