diff --git a/platforms/gpio/analog_sensor_driver_test.go b/platforms/gpio/analog_sensor_driver_test.go index d17c9df4..5a27a139 100644 --- a/platforms/gpio/analog_sensor_driver_test.go +++ b/platforms/gpio/analog_sensor_driver_test.go @@ -1,8 +1,9 @@ package gpio import ( - "github.com/hybridgroup/gobot" "testing" + + "github.com/hybridgroup/gobot" ) func initTestAnalogSensorDriver() *AnalogSensorDriver { @@ -19,11 +20,6 @@ func TestAnalogSensorDriverHalt(t *testing.T) { gobot.Assert(t, d.Halt(), true) } -func TestAnalogSensorDriverInit(t *testing.T) { - d := initTestAnalogSensorDriver() - gobot.Assert(t, d.Init(), true) -} - func TestAnalogSensorDriverRead(t *testing.T) { d := initTestAnalogSensorDriver() gobot.Assert(t, d.Read(), 99) diff --git a/platforms/gpio/button_driver_test.go b/platforms/gpio/button_driver_test.go index a6ebc52c..86b090d7 100644 --- a/platforms/gpio/button_driver_test.go +++ b/platforms/gpio/button_driver_test.go @@ -1,8 +1,9 @@ package gpio import ( - "github.com/hybridgroup/gobot" "testing" + + "github.com/hybridgroup/gobot" ) func initTestButtonDriver() *ButtonDriver { @@ -19,11 +20,6 @@ func TestButtonDriverHalt(t *testing.T) { gobot.Assert(t, d.Halt(), true) } -func TestButtonDriverInit(t *testing.T) { - d := initTestButtonDriver() - gobot.Assert(t, d.Init(), true) -} - func TestButtonDriverReadState(t *testing.T) { d := initTestButtonDriver() gobot.Assert(t, d.readState(), 1) diff --git a/platforms/gpio/direct_pin_driver_test.go b/platforms/gpio/direct_pin_driver_test.go index 17e6de33..96e7d012 100644 --- a/platforms/gpio/direct_pin_driver_test.go +++ b/platforms/gpio/direct_pin_driver_test.go @@ -1,8 +1,9 @@ package gpio import ( - "github.com/hybridgroup/gobot" "testing" + + "github.com/hybridgroup/gobot" ) func initTestDirectPinDriver() *DirectPinDriver { @@ -19,11 +20,6 @@ func TestDirectPinDriverHalt(t *testing.T) { gobot.Assert(t, d.Halt(), true) } -func TestDirectPinDriverInit(t *testing.T) { - d := initTestDirectPinDriver() - gobot.Assert(t, d.Init(), true) -} - func TestDirectPinDriverDigitalRead(t *testing.T) { d := initTestDirectPinDriver() gobot.Assert(t, d.DigitalRead(), 1) diff --git a/platforms/gpio/led_driver_test.go b/platforms/gpio/led_driver_test.go index 4c8b8c76..9289e075 100644 --- a/platforms/gpio/led_driver_test.go +++ b/platforms/gpio/led_driver_test.go @@ -20,30 +20,25 @@ func TestLedDriverHalt(t *testing.T) { gobot.Assert(t, d.Halt(), true) } -func TestLedDriverInit(t *testing.T) { - d := initTestLedDriver() - gobot.Assert(t, d.Init(), true) -} - func TestLedDriverOn(t *testing.T) { d := initTestLedDriver() gobot.Assert(t, d.On(), true) - gobot.Assert(t, d.IsOn(), true) + gobot.Assert(t, d.State(), true) } func TestLedDriverOff(t *testing.T) { d := initTestLedDriver() gobot.Assert(t, d.Off(), true) - gobot.Assert(t, d.IsOff(), true) + gobot.Assert(t, d.State(), false) } func TestLedDriverToggle(t *testing.T) { d := initTestLedDriver() d.Off() d.Toggle() - gobot.Assert(t, d.IsOn(), true) + gobot.Assert(t, d.State(), true) d.Toggle() - gobot.Assert(t, d.IsOff(), true) + gobot.Assert(t, d.State(), false) } func TestLedDriverBrightness(t *testing.T) { diff --git a/platforms/gpio/motor_driver_test.go b/platforms/gpio/motor_driver_test.go index 5ffee99d..18f4e14f 100644 --- a/platforms/gpio/motor_driver_test.go +++ b/platforms/gpio/motor_driver_test.go @@ -1,8 +1,9 @@ package gpio import ( - "github.com/hybridgroup/gobot" "testing" + + "github.com/hybridgroup/gobot" ) func initTestMotorDriver() *MotorDriver { @@ -19,11 +20,6 @@ func TestMotorDriverHalt(t *testing.T) { gobot.Assert(t, d.Halt(), true) } -func TestMotorDriverInit(t *testing.T) { - d := initTestMotorDriver() - gobot.Assert(t, d.Init(), true) -} - func TestMotorDriverIsOn(t *testing.T) { d := initTestMotorDriver() d.CurrentMode = "digital" diff --git a/platforms/gpio/servo_driver_test.go b/platforms/gpio/servo_driver_test.go index 27e52b4f..a92fe79c 100644 --- a/platforms/gpio/servo_driver_test.go +++ b/platforms/gpio/servo_driver_test.go @@ -1,8 +1,9 @@ package gpio import ( - "github.com/hybridgroup/gobot" "testing" + + "github.com/hybridgroup/gobot" ) func initTestServoDriver() *ServoDriver { @@ -19,11 +20,6 @@ func TestServoDriverHalt(t *testing.T) { gobot.Assert(t, d.Halt(), true) } -func TestServoDriverInit(t *testing.T) { - d := initTestServoDriver() - gobot.Assert(t, d.Init(), true) -} - func TestServoDriverMove(t *testing.T) { d := initTestServoDriver() d.Move(100)