(t *testing.T)
| 239 | } |
| 240 | |
| 241 | func TestOptTable(t *testing.T) { |
| 242 | L := NewState() |
| 243 | defer L.Close() |
| 244 | errorIfGFuncNotFail(t, L, func(L *LState) int { |
| 245 | deftbl := L.NewTable() |
| 246 | errorIfNotEqual(t, deftbl, L.OptTable(1, deftbl)) |
| 247 | tbl := L.NewTable() |
| 248 | L.Push(tbl) |
| 249 | errorIfNotEqual(t, tbl, L.OptTable(2, deftbl)) |
| 250 | L.Push(LNumber(10)) |
| 251 | L.OptTable(3, deftbl) |
| 252 | return 0 |
| 253 | }, "table expected, got number") |
| 254 | } |
| 255 | |
| 256 | func TestOptFunction(t *testing.T) { |
| 257 | L := NewState() |
nothing calls this directly
no test coverage detected
searching dependent graphs…