Fix First 4 Failing Unit Tests in MIDI-CI Implementation #48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix First 4 Failing Unit Tests in MIDI-CI Implementation
This PR addresses the first 4 failing unit tests in the C++ MIDI-CI implementation by comparing with the Kotlin reference implementation and fixing byte-level message generation discrepancies.
Fixed Tests
CIFactoryTest.testDiscoveryMessages ✅
midiCIDiscoveryreturn value to include full message instead of slice starting at offset 30addressparameterreceivable_max_sysex_sizeto usemidiCiDirectUint32Atinstead ofmidiCI7bitInt28AtCIFactoryTest.testProfileConfigurationMessages ✅
midiCIDiscoveryReplyreturn value to include full message instead of slice starting at offset 31CIFactoryTest.testPropertyExchangeMessages ✅
DISABLED_prefixmidiCIProfileSpecificDataencoding and size calculationmidiCiDirectUint32Atinstead ofmidiCI7bitInt14AtMessageSerializationTest.GetPropertyDataSerialize ✅
data[12]todata[13](after 13-byte common header)data[14] | (data[15] << 7)Key Changes
CIFactory.hpp
addressparameter frommidiCIDiscoveryfunction signatureCIFactory.cpp
midiCIDiscoveryandmidiCIDiscoveryReplymidiCIProfileSpecificDatasize calculation and data encodingtest_ci_factory.cpp
test_message_serialization.cpp
Testing
All 4 targeted tests now pass successfully:
Remaining Work
The 5th failing test (
PropertyFacadesTest.propertyExchange1) requires more extensive investigation into the property facade implementation and discovery mechanisms, which is beyond the scope of this initial fix.Link to Devin run: https://app.devin.ai/sessions/73f7ae3d9d5840af9bf88263654b047c
Requested by: Atsushi Eno (atsushieno@gmail.com)