(t *testing.T)
| 17 | } |
| 18 | |
| 19 | func TestToBooleanOutOfRange(t *testing.T) { |
| 20 | l := NewState() |
| 21 | l.SetTop(0) |
| 22 | l.PushBoolean(false) |
| 23 | l.PushBoolean(true) |
| 24 | |
| 25 | for i, want := range []bool{false, true, false, false} { |
| 26 | idx := 1 + i |
| 27 | if got := l.ToBoolean(idx); got != want { |
| 28 | t.Errorf("l.ToBoolean(%d) = %t; want %t", idx, got, want) |
| 29 | } |
| 30 | } |
| 31 | } |
nothing calls this directly
no test coverage detected