(t *testing.T)
| 44 | } |
| 45 | |
| 46 | func TestCheckString(t *testing.T) { |
| 47 | L := NewState() |
| 48 | defer L.Close() |
| 49 | errorIfGFuncNotFail(t, L, func(L *LState) int { |
| 50 | L.Push(LString("aaa")) |
| 51 | errorIfNotEqual(t, "aaa", L.CheckString(2)) |
| 52 | L.Push(LNumber(10)) |
| 53 | errorIfNotEqual(t, "10", L.CheckString(3)) |
| 54 | L.Push(L.NewTable()) |
| 55 | L.CheckString(4) |
| 56 | return 0 |
| 57 | }, "string expected, got table") |
| 58 | } |
| 59 | |
| 60 | func TestCheckBool(t *testing.T) { |
| 61 | L := NewState() |
nothing calls this directly
no test coverage detected
searching dependent graphs…