MCPcopy Create free account
hub / github.com/facebook/time / TestGetSendsExpectedCommand

Function TestGetSendsExpectedCommand

sa53/protocol/protocol_test.go:169–176  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

167}
168
169func TestGetSendsExpectedCommand(t *testing.T) {
170 fp := &fakePort{chunks: [][]byte{[]byte("[=276428]\r\n")}}
171 m := newTestMac(fp)
172 got, err := m.Get("DigitalTuning")
173 require.NoError(t, err)
174 require.Equal(t, "276428", got)
175 require.Equal(t, "{get,DigitalTuning}", string(fp.written))
176}
177
178func TestGetPropagatesDeviceError(t *testing.T) {
179 fp := &fakePort{chunks: [][]byte{[]byte("[!1]\r\n")}}

Callers

nothing calls this directly

Calls 2

newTestMacFunction · 0.85
GetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…