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

Function runAxisChecks

axis_test.go:151–159  ·  view source on GitHub ↗

Checks the value of all configured axis against the expected values.

(msg string, t *testing.T, expect [6]axState)

Source from the content-addressed store, hash-verified

149
150// Checks the value of all configured axis against the expected values.
151func runAxisChecks(msg string, t *testing.T, expect [6]axState) {
152 for i, cfg := range axSimpleCfg {
153 exp := expect[i]
154 axi := Input.Axis(cfg.Name)
155 if exp.value != axi.Value() {
156 t.Error(msg, " Invalid on: ", cfg.Name, " - Value")
157 }
158 }
159}
160
161// Test configured axes using a single pair on one axis.
162func TestAxisSimple(t *testing.T) {

Callers 2

TestAxisSimpleFunction · 0.85
TestAxisComplexFunction · 0.85

Calls 3

AxisMethod · 0.80
ValueMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected