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

Function runAxisMouse

axis_test.go:416–424  ·  view source on GitHub ↗

Checks the state of the two mouse axes against provided values.

(msg string, t *testing.T, x float32, y float32)

Source from the content-addressed store, hash-verified

414
415// Checks the state of the two mouse axes against provided values.
416func runAxisMouse(msg string, t *testing.T, x float32, y float32) {
417
418 if x != Input.Axis("mouse x").Value() {
419 t.Error(msg, "Invalid x value: ", x, "!=", Input.Axis("mouse x").Value())
420 }
421 if y != Input.Axis("mouse y").Value() {
422 t.Error(msg, "Invalid y value: ", y, "!=", Input.Axis("mouse y").Value())
423 }
424}
425
426// Test some state changes on the two mouse axes.
427func TestAxisMouse(t *testing.T) {

Callers 1

TestAxisMouseFunction · 0.85

Calls 3

AxisMethod · 0.80
ValueMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected