(t *testing.T)
| 197 | } |
| 198 | |
| 199 | func TestSetPosition(t *testing.T) { |
| 200 | b := makeBufferForTesting(120, 80) |
| 201 | assert.Equal(t, 0, int(b.CursorColumn())) |
| 202 | assert.Equal(t, 0, int(b.CursorLine())) |
| 203 | |
| 204 | b.setPosition(60, 10) |
| 205 | assert.Equal(t, 60, int(b.CursorColumn())) |
| 206 | assert.Equal(t, 10, int(b.CursorLine())) |
| 207 | |
| 208 | b.setPosition(0, 0) |
| 209 | assert.Equal(t, 0, int(b.CursorColumn())) |
| 210 | assert.Equal(t, 0, int(b.CursorLine())) |
| 211 | |
| 212 | b.setPosition(120, 90) |
| 213 | assert.Equal(t, 119, int(b.CursorColumn())) |
| 214 | assert.Equal(t, 79, int(b.CursorLine())) |
| 215 | |
| 216 | } |
| 217 | |
| 218 | func TestMovePosition(t *testing.T) { |
| 219 | b := makeBufferForTesting(120, 80) |
nothing calls this directly
no test coverage detected