(t *testing.T)
| 130 | } |
| 131 | |
| 132 | func TestRemove(t *testing.T) { |
| 133 | L := NewState() |
| 134 | defer L.Close() |
| 135 | L.Push(LString("a")) |
| 136 | L.Push(LString("b")) |
| 137 | L.Push(LString("c")) |
| 138 | |
| 139 | L.Remove(4) |
| 140 | errorIfNotEqual(t, LString("a"), L.Get(1)) |
| 141 | errorIfNotEqual(t, LString("b"), L.Get(2)) |
| 142 | errorIfNotEqual(t, LString("c"), L.Get(3)) |
| 143 | errorIfNotEqual(t, 3, L.GetTop()) |
| 144 | |
| 145 | L.Remove(3) |
| 146 | errorIfNotEqual(t, LString("a"), L.Get(1)) |
| 147 | errorIfNotEqual(t, LString("b"), L.Get(2)) |
| 148 | errorIfNotEqual(t, LNil, L.Get(3)) |
| 149 | errorIfNotEqual(t, 2, L.GetTop()) |
| 150 | L.Push(LString("c")) |
| 151 | |
| 152 | L.Remove(-10) |
| 153 | errorIfNotEqual(t, LString("a"), L.Get(1)) |
| 154 | errorIfNotEqual(t, LString("b"), L.Get(2)) |
| 155 | errorIfNotEqual(t, LString("c"), L.Get(3)) |
| 156 | errorIfNotEqual(t, 3, L.GetTop()) |
| 157 | |
| 158 | L.Remove(2) |
| 159 | errorIfNotEqual(t, LString("a"), L.Get(1)) |
| 160 | errorIfNotEqual(t, LString("c"), L.Get(2)) |
| 161 | errorIfNotEqual(t, LNil, L.Get(3)) |
| 162 | errorIfNotEqual(t, 2, L.GetTop()) |
| 163 | } |
| 164 | |
| 165 | func TestToInt(t *testing.T) { |
| 166 | L := NewState() |
nothing calls this directly
no test coverage detected
searching dependent graphs…