Replace descriptor Configs with a map - config ids are arbitrary numbers
(unlike interface or alt setting numbers, which are 0-based array indices). This makes it easier to access a particular config without having to iterate over the descriptors.
This commit is contained in:
@@ -47,7 +47,7 @@ func TestOpenEndpoint(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("%s.InEndpoint(6): got error %v, want nil", intf, err)
|
||||
}
|
||||
if want := fakeDevices[1].Configs[0].Interfaces[1].AltSettings[1].Endpoints[1]; !reflect.DeepEqual(got.Info, want) {
|
||||
if want := fakeDevices[1].Configs[1].Interfaces[1].AltSettings[1].Endpoints[1]; !reflect.DeepEqual(got.Info, want) {
|
||||
t.Errorf("%s.InEndpoint(6): got %+v, want %+v", intf, got, want)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user