diff --git a/__tests__/src/packages/game/input.test.c b/__tests__/src/packages/game/input.test.c index 24b6541..5e43914 100644 --- a/__tests__/src/packages/game/input.test.c +++ b/__tests__/src/packages/game/input.test.c @@ -99,6 +99,9 @@ spec("input") { it("handles positive motion") { e.jaxis.value = GenerateAxisValueOutsideThreshold(state[p].config.axis_threshold); + if (e.jaxis.value < 0) { + e.jaxis.value = -e.jaxis.value; + } action[p] = 0; printf("(axis value: %d) ", e.jaxis.value); @@ -111,6 +114,9 @@ spec("input") { it("handles negative motion") { e.jaxis.value = -GenerateAxisValueOutsideThreshold(state[p].config.axis_threshold); + if (e.jaxis.value > 0) { + e.jaxis.value = -e.jaxis.value; + } action[p] = 0; printf("(axis value: %d) ", e.jaxis.value); @@ -141,6 +147,9 @@ spec("input") { it("handles positive motion") { e.jaxis.value = GenerateAxisValueOutsideThreshold(state[p].config.axis_threshold); + if (e.jaxis.value < 0) { + e.jaxis.value = -e.jaxis.value; + } action[p] = 0; printf("(axis value: %d) ", e.jaxis.value); @@ -153,6 +162,9 @@ spec("input") { it("handles negative motion") { e.jaxis.value = -GenerateAxisValueOutsideThreshold(state[p].config.axis_threshold); + if (e.jaxis.value > 0) { + e.jaxis.value = -e.jaxis.value; + } action[p] = 0; printf("(axis value: %d) ", e.jaxis.value); @@ -183,6 +195,9 @@ spec("input") { it("handles positive motion") { e.jaxis.value = GenerateAxisValueOutsideThreshold(state[p].config.axis_threshold); + if (e.jaxis.value < 0) { + e.jaxis.value = -e.jaxis.value; + } action[p] = 0; printf("(axis value: %d) ", e.jaxis.value); @@ -195,6 +210,9 @@ spec("input") { it("handles negative motion") { e.jaxis.value = -GenerateAxisValueOutsideThreshold(state[p].config.axis_threshold); + if (e.jaxis.value > 0) { + e.jaxis.value = -e.jaxis.value; + } action[p] = 0; printf("(axis value: %d) ", e.jaxis.value); @@ -225,6 +243,9 @@ spec("input") { it("handles positive motion") { e.jaxis.value = GenerateAxisValueOutsideThreshold(state[p].config.axis_threshold); + if (e.jaxis.value < 0) { + e.jaxis.value = -e.jaxis.value; + } action[p] = 0; printf("(axis value: %d) ", e.jaxis.value); @@ -237,6 +258,9 @@ spec("input") { it("handles negative motion") { e.jaxis.value = -GenerateAxisValueOutsideThreshold(state[p].config.axis_threshold); + if (e.jaxis.value > 0) { + e.jaxis.value = -e.jaxis.value; + } action[p] = 0; printf("(axis value: %d) ", e.jaxis.value);