Close the Context

This commit is contained in:
Sebastian Zagrodzki
2017-04-27 03:01:10 +02:00
parent a1b915080e
commit 2bcc25f8d0

View File

@@ -25,6 +25,7 @@ func TestOpenEndpoint(t *testing.T) {
libusb = newFakeLibusb()
c := NewContext()
defer c.Close()
dev, err := c.OpenDeviceWithVidPid(0x8888, 0x0002)
if dev == nil {
t.Fatal("OpenDeviceWithVidPid(0x8888, 0x0002): got nil device, need non-nil")