(t *testing.T)
| 216 | } |
| 217 | |
| 218 | func TestMovePosition(t *testing.T) { |
| 219 | b := makeBufferForTesting(120, 80) |
| 220 | assert.Equal(t, 0, int(b.CursorColumn())) |
| 221 | assert.Equal(t, 0, int(b.CursorLine())) |
| 222 | |
| 223 | b.movePosition(-1, -1) |
| 224 | assert.Equal(t, 0, int(b.CursorColumn())) |
| 225 | assert.Equal(t, 0, int(b.CursorLine())) |
| 226 | |
| 227 | b.movePosition(30, 20) |
| 228 | assert.Equal(t, 30, int(b.CursorColumn())) |
| 229 | assert.Equal(t, 20, int(b.CursorLine())) |
| 230 | |
| 231 | b.movePosition(30, 20) |
| 232 | assert.Equal(t, 60, int(b.CursorColumn())) |
| 233 | assert.Equal(t, 40, int(b.CursorLine())) |
| 234 | |
| 235 | b.movePosition(-1, -1) |
| 236 | assert.Equal(t, 59, int(b.CursorColumn())) |
| 237 | assert.Equal(t, 39, int(b.CursorLine())) |
| 238 | |
| 239 | b.movePosition(100, 100) |
| 240 | assert.Equal(t, 119, int(b.CursorColumn())) |
| 241 | assert.Equal(t, 79, int(b.CursorLine())) |
| 242 | |
| 243 | } |
| 244 | |
| 245 | func TestVisibleLines(t *testing.T) { |
| 246 | b := makeBufferForTesting(80, 10) |
nothing calls this directly
no test coverage detected