mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-04-26 13:48:49 +08:00
aio: additional test coverage for Analog Sensor
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
518a563597
commit
678476b612
@ -2,6 +2,7 @@ package aio
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@ -107,3 +108,14 @@ func TestAnalogSensorDriverHalt(t *testing.T) {
|
||||
t.Errorf("AnalogSensor was not halted")
|
||||
}
|
||||
}
|
||||
|
||||
func TestAnalogSensorDriverDefaultName(t *testing.T) {
|
||||
d := NewAnalogSensorDriver(newAioTestAdaptor(), "1")
|
||||
gobottest.Assert(t, strings.HasPrefix(d.Name(), "AnalogSensor"), true)
|
||||
}
|
||||
|
||||
func TestAnalogSensorDriverSetName(t *testing.T) {
|
||||
d := NewAnalogSensorDriver(newAioTestAdaptor(), "1")
|
||||
d.SetName("mybot")
|
||||
gobottest.Assert(t, d.Name(), "mybot")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user