add test for an interrupt endpoint.

This commit is contained in:
Sebastian Zagrodzki
2017-04-09 00:22:11 +02:00
parent ab6b612d1b
commit 83302ae558

View File

@@ -27,6 +27,16 @@ func TestEndpointInfo(t *testing.T) {
},
want: "Endpoint #2 OUT (address 0x02) isochronous - asynchronous data [512 bytes]",
},
{
ep: EndpointInfo{
Number: 3,
Direction: EndpointDirectionIn,
TransferType: TransferTypeInterrupt,
MaxPacketSize: 16,
UsageType: InterruptUsageTypePeriodic,
},
want: "Endpoint #3 IN (address 0x83) interrupt - periodic [16 bytes]",
},
} {
if got := tc.ep.String(); got != tc.want {
t.Errorf("%#v.String(): got %q, want %q", tc.ep, got, tc.want)