MCPcopy Index your code
hub / github.com/EngoEngine/engo / TestCameraMoveToY

Function TestCameraMoveToY

common/camera_test.go:137–150  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

135}
136
137func TestCameraMoveToY(t *testing.T) {
138 initialize()
139
140 currentY := cam.Y()
141
142 cam.moveToY(currentY + 5)
143 assert.Equal(t, cam.Y(), currentY+5, "Moving to current + 5 should get us to current + 5")
144
145 cam.moveToY(600)
146 assert.Equal(t, cam.Y(), CameraBounds.Max.Y, "Moving to a location out of bounds, should get us to the maximum")
147
148 cam.moveToY(-10)
149 assert.Equal(t, cam.Y(), CameraBounds.Min.Y, "Moving to a location out of bounds, should get us to the minimum")
150}
151
152func TestCameraZoomTo(t *testing.T) {
153 initialize()

Callers

nothing calls this directly

Calls 4

initializeFunction · 0.85
YMethod · 0.80
moveToYMethod · 0.80
EqualMethod · 0.80

Tested by

no test coverage detected