aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/kylelemons/gousb/usb/config_test.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-09-09 09:42:37 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-09-09 09:42:37 +0200
commit500caaeda74dd9c660279036293f4b2997cf0b03 (patch)
tree1226f60231a408b0aae67867faaa3f2cfbac8c83 /vendor/github.com/kylelemons/gousb/usb/config_test.go
parent413560591fc2d89a73eb8a33ba28b0cc3407b1db (diff)
Add vendor
Diffstat (limited to 'vendor/github.com/kylelemons/gousb/usb/config_test.go')
-rw-r--r--vendor/github.com/kylelemons/gousb/usb/config_test.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/vendor/github.com/kylelemons/gousb/usb/config_test.go b/vendor/github.com/kylelemons/gousb/usb/config_test.go
new file mode 100644
index 0000000..f4cbbcf
--- /dev/null
+++ b/vendor/github.com/kylelemons/gousb/usb/config_test.go
@@ -0,0 +1,32 @@
+package usb
+
+import "testing"
+
+func TestEndpointInfo(t *testing.T) {
+ for _, tc := range []struct {
+ ep EndpointInfo
+ want string
+ }{
+ {
+ ep: EndpointInfo{
+ Address: 0x86,
+ Attributes: 0x02,
+ MaxPacketSize: 512,
+ },
+ want: "Endpoint #6 IN bulk - unsynchronized data [512 0]",
+ },
+ {
+ ep: EndpointInfo{
+ Address: 0x02,
+ Attributes: 0x05,
+ MaxPacketSize: 512,
+ MaxIsoPacket: 512,
+ },
+ want: "Endpoint #2 OUT isochronous - asynchronous data [512 512]",
+ },
+ } {
+ if got := tc.ep.String(); got != tc.want {
+ t.Errorf("%#v.String(): got %q, want %q", tc.ep, got, tc.want)
+ }
+ }
+}