mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-04-27 13:48:56 +08:00
microbit: increase driver test coverage
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
25c2abe3e5
commit
d63e5b3d9b
@ -27,3 +27,29 @@ func TestLEDDriverStartAndHalt(t *testing.T) {
|
||||
gobottest.Assert(t, d.Start(), nil)
|
||||
gobottest.Assert(t, d.Halt(), nil)
|
||||
}
|
||||
|
||||
func TestLEDDriverWriteMatrix(t *testing.T) {
|
||||
d := initTestLEDDriver()
|
||||
d.Start()
|
||||
gobottest.Assert(t, d.WriteMatrix([]byte{0x01, 0x02}), nil)
|
||||
}
|
||||
|
||||
func TestLEDDriverWriteText(t *testing.T) {
|
||||
d := initTestLEDDriver()
|
||||
d.Start()
|
||||
gobottest.Assert(t, d.WriteText("Hello"), nil)
|
||||
}
|
||||
|
||||
func TestLEDDriverCommands(t *testing.T) {
|
||||
d := initTestLEDDriver()
|
||||
d.Start()
|
||||
gobottest.Assert(t, d.Blank(), nil)
|
||||
gobottest.Assert(t, d.Solid(), nil)
|
||||
gobottest.Assert(t, d.UpRightArrow(), nil)
|
||||
gobottest.Assert(t, d.UpLeftArrow(), nil)
|
||||
gobottest.Assert(t, d.DownRightArrow(), nil)
|
||||
gobottest.Assert(t, d.DownLeftArrow(), nil)
|
||||
gobottest.Assert(t, d.Dimond(), nil)
|
||||
gobottest.Assert(t, d.Smile(), nil)
|
||||
gobottest.Assert(t, d.Wink(), nil)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user