X-Git-Url: https://git.giacomolli.uk/onehouse/blobdiff_plain/2392f423feb689c99600e5cb2c37ee93c62e603d..d1910130620af1355128795e5dbcacab4f476950:/driver/m31/connection_test.go?ds=inline diff --git a/driver/m31/connection_test.go b/driver/m31/connection_test.go index f2e67a6..ede502b 100644 --- a/driver/m31/connection_test.go +++ b/driver/m31/connection_test.go @@ -58,6 +58,12 @@ func TestConnectionRejectsConfigurationAndReadFailuresBeforeOnline(t *testing.T) {name: "rejects pulse register write failure", change: func(c *fakeClient) { c.registerErr = errors.New("configuration failed") }}, + {name: "rejects configuration read failure", change: func(c *fakeClient) { + c.registerReadErr = errors.New("configuration read failed") + }}, + {name: "rejects pulse width mismatch", change: func(c *fakeClient) { + c.wrongRegister = pulseWidthBase + 2 + }}, {name: "rejects configuration mismatch", change: func(c *fakeClient) { c.wrongConfig = true }}, @@ -77,7 +83,7 @@ func TestConnectionRejectsConfigurationAndReadFailuresBeforeOnline(t *testing.T) for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - d, client, transport := testAssembly(t) + d, client, transport, _ := testAssembly(t) tc.change(client) c := &connection{owner: d}