Add tests for endpoint NewStream.

Rename OpenWithVidPid to OpenWithVIDPID.
This commit is contained in:
Sebastian Zagrodzki
2017-04-29 12:57:55 +02:00
parent 58c1e6ddb4
commit 730c32b9fd
9 changed files with 239 additions and 141 deletions

View File

@@ -34,13 +34,13 @@ func TestClaimAndRelease(t *testing.T) {
)
c := NewContext()
defer c.Close()
dev, err := c.OpenDeviceWithVidPid(0x8888, 0x0002)
dev, err := c.OpenDeviceWithVIDPID(0x8888, 0x0002)
if dev == nil {
t.Fatal("OpenDeviceWithVidPid(0x8888, 0x0002): got nil device, need non-nil")
t.Fatal("OpenDeviceWithVIDPID(0x8888, 0x0002): got nil device, need non-nil")
}
defer dev.Close()
if err != nil {
t.Fatalf("OpenDeviceWithVidPid(0x8888, 0x0002): %v", err)
t.Fatalf("OpenDeviceWithVIDPID(0x8888, 0x0002): %v", err)
}
cfg, err := dev.Config(cfgNum)
if err != nil {