mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-05-14 19:29:32 +08:00
29 lines
478 B
Go
29 lines
478 B
Go
package gpio
|
|
|
|
import (
|
|
"github.com/hybridgroup/gobot"
|
|
"testing"
|
|
)
|
|
|
|
var a *AnalogSensorDriver
|
|
|
|
func init() {
|
|
a = NewAnalogSensorDriver(TestAdaptor{}, "bot", "1")
|
|
}
|
|
|
|
func TestAnalogSensorStart(t *testing.T) {
|
|
gobot.Expect(t, a.Start(), true)
|
|
}
|
|
|
|
func TestAnalogSensorHalt(t *testing.T) {
|
|
gobot.Expect(t, a.Halt(), true)
|
|
}
|
|
|
|
func TestAnalogSensorInit(t *testing.T) {
|
|
gobot.Expect(t, a.Init(), true)
|
|
}
|
|
|
|
func TestAnalogSensorRead(t *testing.T) {
|
|
gobot.Expect(t, a.Read(), 99)
|
|
}
|