Config and interface description (#16)
* Add APIs for config and interface descriptors. Split out the common parts of selecting a config descriptor from device desc and selecting a setting descriptor from a config desc. * Parallelize the few tests that actually can be parallelized safely. Add comments where they can't. Note to self: it would be beneficial to restructure the fakelibusb to index all properties of the lib with the used context. That way a libusb implementation wouldn't need to be referred via a shared variable.
This commit is contained in:
@@ -18,6 +18,7 @@ package gousb
|
||||
import "testing"
|
||||
|
||||
func TestOPenDevices(t *testing.T) {
|
||||
// Can't be parallelized, newFakeLibusb modifies a shared global state.
|
||||
_, done := newFakeLibusb()
|
||||
defer done()
|
||||
|
||||
@@ -54,6 +55,7 @@ func TestOPenDevices(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOpenDeviceWithVIDPID(t *testing.T) {
|
||||
// Can't be parallelized, newFakeLibusb modifies a shared global state.
|
||||
_, done := newFakeLibusb()
|
||||
defer done()
|
||||
|
||||
|
Reference in New Issue
Block a user