MCPcopy
hub / github.com/EngoEngine/engo / TestSetGlobalScale

Function TestSetGlobalScale

engo_test.go:248–265  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

246}
247
248func TestSetGlobalScale(t *testing.T) {
249 data := []struct {
250 in Point
251 exp Point
252 }{
253 {Point{X: 5, Y: 5}, Point{X: 5, Y: 5}},
254 {Point{X: -5, Y: 5}, Point{X: 1, Y: 1}},
255 {Point{X: 5, Y: -5}, Point{X: 1, Y: 1}},
256 {Point{X: -5, Y: -5}, Point{X: 1, Y: 1}},
257 }
258
259 for _, d := range data {
260 SetGlobalScale(d.in)
261 if opts.GlobalScale.X != d.exp.X || opts.GlobalScale.Y != d.exp.Y {
262 t.Errorf("SetGlobalScale did not set properly. was: %v, expected: %v", opts.GlobalScale, d.exp)
263 }
264 }
265}
266
267func TestSceneSwitching(t *testing.T) {
268 RegisterScene(&testScene2{})

Callers

nothing calls this directly

Calls 1

SetGlobalScaleFunction · 0.85

Tested by

no test coverage detected