(t *testing.T)
| 83 | } |
| 84 | |
| 85 | func TestCheckFunction(t *testing.T) { |
| 86 | L := NewState() |
| 87 | defer L.Close() |
| 88 | errorIfGFuncNotFail(t, L, func(L *LState) int { |
| 89 | fn := L.NewFunction(func(l *LState) int { return 0 }) |
| 90 | L.Push(fn) |
| 91 | errorIfNotEqual(t, fn, L.CheckFunction(2)) |
| 92 | L.Push(LNumber(10)) |
| 93 | L.CheckFunction(3) |
| 94 | return 0 |
| 95 | }, "function expected, got number") |
| 96 | } |
| 97 | |
| 98 | func TestCheckUserData(t *testing.T) { |
| 99 | L := NewState() |
nothing calls this directly
no test coverage detected
searching dependent graphs…