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

Function TestCameraZoomTo

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

Source from the content-addressed store, hash-verified

150}
151
152func TestCameraZoomTo(t *testing.T) {
153 initialize()
154
155 currentZ := cam.Z()
156
157 cam.zoomTo(currentZ + 1)
158 assert.Equal(t, cam.Z(), currentZ+1, "Zooming to current + 1 should get us to current + 1")
159
160 cam.zoomTo(600)
161 assert.Equal(t, cam.Z(), MaxZoom, "Zooming too close, should get us to the minimum distance")
162
163 cam.zoomTo(-10)
164 assert.Equal(t, cam.Z(), MinZoom, "Zooming too far, should get us to the maximum distance")
165}
166
167func TestCameraAddOnlyOne(t *testing.T) {
168 var buf bytes.Buffer

Callers

nothing calls this directly

Calls 4

initializeFunction · 0.85
ZMethod · 0.80
zoomToMethod · 0.80
EqualMethod · 0.80

Tested by

no test coverage detected