(t *testing.T)
| 218 | } |
| 219 | |
| 220 | func TestToFunction(t *testing.T) { |
| 221 | L := NewState() |
| 222 | defer L.Close() |
| 223 | L.Push(LNumber(10)) |
| 224 | L.Push(LString("99.9")) |
| 225 | L.Push(L.NewFunction(func(L *LState) int { return 0 })) |
| 226 | errorIfFalse(t, L.ToFunction(1) == nil, "index 1 must be nil") |
| 227 | errorIfFalse(t, L.ToFunction(2) == nil, "index 2 must be nil") |
| 228 | errorIfNotEqual(t, L.Get(3), L.ToFunction(3)) |
| 229 | } |
| 230 | |
| 231 | func TestToUserData(t *testing.T) { |
| 232 | L := NewState() |
nothing calls this directly
no test coverage detected
searching dependent graphs…