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:
@@ -106,6 +106,7 @@ func (r readRes) String() string {
|
||||
}
|
||||
|
||||
func TestTransferReadStream(t *testing.T) {
|
||||
t.Parallel()
|
||||
for tcNum, tc := range []struct {
|
||||
desc string
|
||||
closeBefore int
|
||||
@@ -211,7 +212,9 @@ func TestTransferReadStream(t *testing.T) {
|
||||
},
|
||||
},
|
||||
} {
|
||||
tcNum, tc := tcNum, tc // t.Parallel will delay the execution of the test, save the iteration values.
|
||||
t.Run(strconv.Itoa(tcNum), func(t *testing.T) {
|
||||
t.Parallel()
|
||||
t.Logf("Case %d: %s", tcNum, tc.desc)
|
||||
ftt := make([]*fakeStreamTransfer, len(tc.transfers))
|
||||
tt := make([]transferIntf, len(tc.transfers))
|
||||
|
Reference in New Issue
Block a user