Skip to content

Commit

Permalink
Clean up test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
randhid committed Mar 19, 2024
1 parent 32aa433 commit 673966b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions components/motor/gpio/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,13 @@ func TestMotorAB(t *testing.T) {
})

t.Run("motor (A/B) GoFor testing", func(t *testing.T) {
err := m.SetPower(ctx, .5, nil)
test.That(t, err, test.ShouldBeNil)
test.That(t, m.SetPower(ctx, .5, nil), test.ShouldBeNil)
test.That(t, mustGetGPIOPinByName(b, "1").Get(context.Background()), test.ShouldEqual, true)
test.That(t, mustGetGPIOPinByName(b, "2").Get(context.Background()), test.ShouldEqual, false)
test.That(t, mustGetGPIOPinByName(b, "1").PWM(context.Background()), test.ShouldEqual, 0)
test.That(t, mustGetGPIOPinByName(b, "2").PWM(context.Background()), test.ShouldEqual, .5)

err = m.SetPower(ctx, -.5, nil)
test.That(t, err, test.ShouldBeNil)
test.That(t, m.SetPower(ctx, -.5, nil), test.ShouldBeNil)
test.That(t, mustGetGPIOPinByName(b, "1").Get(context.Background()), test.ShouldEqual, false)
test.That(t, mustGetGPIOPinByName(b, "2").Get(context.Background()), test.ShouldEqual, true)
test.That(t, mustGetGPIOPinByName(b, "1").PWM(context.Background()), test.ShouldEqual, .5)
Expand Down

0 comments on commit 673966b

Please sign in to comment.