(cycles, expectedOutput int, t *testing.T)
| 15 | testStepperStateAfter(6, 6, t) |
| 16 | } |
| 17 | func testStepperStateAfter(cycles, expectedOutput int, t *testing.T) { |
| 18 | stepper := NewStepper() |
| 19 | for i := 0; i < cycles; i++ { |
| 20 | stepper.Update(true) |
| 21 | stepper.Update(false) |
| 22 | } |
| 23 | |
| 24 | output := getOutput(stepper) |
| 25 | if expectedOutput != output { |
| 26 | t.Logf("expected %X but got %X", expectedOutput, output) |
| 27 | t.FailNow() |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | func getOutput(stepper *Stepper) int { |
| 32 | fmt.Println(stepper) |
no test coverage detected