xamarin-macios/tests/monotouch-test/CoreMidi
Rolf Bjarne Kvinge 27248b1ddb
[CoreMidi] Make P/Invokes have blittable signatures. (#19724)
This turned into a rather involved exercise, because the
MidiThruConnectionParamsStruct struct had several array fields that needed
marshalling to work.

The changes include:

* Unwrap the array fields with MarshalAs attributes to be individual fields
  instead.
* Write a number of tests to ensure the changes work.
* Fix an overflow issue found by the tests for the Controls array if trying to
  set to an array with more than 65535 elements.
* Fix an overflow issue found by the tests for the Maps array if trying to set
  to an array with more than 65535 elements.
* Fix an issue found by the tests where we wouldn't deserialize the Maps array
  correctly from a byte array / NSData if the Maps array had more than 1
  element.
* Fix a consistency issue found in the tests where deserializing a serialized
  structure doesn't yield the same result.
    * In particular this happens with the ChannelMap property: behavior has
      changed a little bit where setting the ChannelMap to an array with fewer
      than 16 elements (including a null array) will not return the same array
      anymore, but instead an array with 16 elements, where the extra elements
      are all 0. I've also made the ChannelMap property non-nullable, since
      the nullability state isn't serializable into the underlying struct.

Contributes towards #15684.
2024-01-15 17:27:11 +01:00
..
MidiClientTest.cs Fix sending MidiPacket when MidiPacket has been created using a pointer (#18981) 2024-01-02 19:40:32 +01:00
MidiEndpointTest.cs Fix some whitespace issues in various files. (#12399) 2021-08-11 10:06:46 +02:00
MidiThruConnectionParamsTest.cs [CoreMidi] Make P/Invokes have blittable signatures. (#19724) 2024-01-15 17:27:11 +01:00
MidiThruConnectionTests.cs [autoformat] Add monotouch-test (#16701) 2022-11-10 17:59:26 +01:00