Skip to content

Commit

Permalink
gpio: correct test for hd44780 driver to match newer signature
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Nov 28, 2020
1 parent e7defc3 commit 879e89e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/gpio/hd44780_driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package gpio

import (
"errors"
"gobot.io/x/gobot"
"gobot.io/x/gobot/gobottest"
"strings"
"testing"

"gobot.io/x/gobot"
"gobot.io/x/gobot/gobottest"
)

var _ gobot.Driver = (*HD44780Driver)(nil)
Expand Down Expand Up @@ -121,14 +122,14 @@ func TestHD44780DriverWriteError(t *testing.T) {
var a *gpioTestAdaptor

d, a = initTestHD44780Driver4BitModeWithStubbedAdaptor()
a.testAdaptorDigitalWrite = func() (err error) {
a.testAdaptorDigitalWrite = func(string, byte) (err error) {
return errors.New("write error")
}
d.Start()
gobottest.Assert(t, d.Write("hello gobot"), errors.New("write error"))

d, a = initTestHD44780Driver8BitModeWithStubbedAdaptor()
a.testAdaptorDigitalWrite = func() (err error) {
a.testAdaptorDigitalWrite = func(string, byte) (err error) {
return errors.New("write error")
}
d.Start()
Expand Down

0 comments on commit 879e89e

Please sign in to comment.