(t *testing.T)
| 120 | } |
| 121 | |
| 122 | func TestCameraMoveToX(t *testing.T) { |
| 123 | initialize() |
| 124 | |
| 125 | currentX := cam.X() |
| 126 | |
| 127 | cam.moveToX(currentX + 5) |
| 128 | assert.Equal(t, cam.X(), currentX+5, "Moving to current + 5 should get us to current + 5") |
| 129 | |
| 130 | cam.moveToX(600) |
| 131 | assert.Equal(t, cam.X(), CameraBounds.Max.X, "Moving to a location out of bounds, should get us to the maximum") |
| 132 | |
| 133 | cam.moveToX(-10) |
| 134 | assert.Equal(t, cam.X(), CameraBounds.Min.X, "Moving to a location out of bounds, should get us to the minimum") |
| 135 | } |
| 136 | |
| 137 | func TestCameraMoveToY(t *testing.T) { |
| 138 | initialize() |
nothing calls this directly
no test coverage detected