)]}'
{
  "commit": "3c5a771e05154a8ceff1f5001d0cb66c6e8d6de2",
  "tree": "3af0561c3f3b4de798d30eb44fb69ff1cc3b4c14",
  "parents": [
    "719b775ed9d5e2b5c8cab2a78e39b023dab08d28"
  ],
  "author": {
    "name": "Lyudmila Kostanyan",
    "email": "119743330+LyudmilaKostanyan@users.noreply.github.com",
    "time": "Wed Jul 16 18:25:51 2025 +0400"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Jul 16 14:25:51 2025 +0000"
  },
  "message": "Increase unit test code coverage of `ble/` by 3.6% (#39913)\n\n* Added tests for `EncodeStandAloneAck` covering\n\n- Added unit test EncodeStandAloneAckOnePacket to verify standalone ACK encoding after receiving a single packet.\n- Added unit test EncodeStandAloneAckNoUnackedData to verify standalone ACK encoding when there is no unacknowledged data.\n- Added unit test EncodeStandAloneAckInsufficientBuffer to verify error handling when the buffer is too small for standalone ACK encoding.\n\n* Add test `HandleCharacteristicReceivedIncorrectSequence`\n\nThis test verifies that BtpEngine transitions to the error state when a new packet with an incremented sequence number is received without resetting the previous state, ensuring correct handling of out-of-order or duplicate sequences.\n\n* Add test `EncodeStandAloneAckMultiFragmentMessage`\n\nThis test verifies that BtpEngine correctly handles multi-fragment message reception and generates a standalone acknowledgment with the expected sequence number and fragment count after all fragments are received.\n\n* Add test `HandleCharacteristicReceivedUnexpectedStandaloneAck`\n\nThis test verifies that the BtpEngine correctly handles the error case when receiving an unexpected standalone ACK packet (one that doesn\u0027t correspond to any pending transmission).\n\n* Add test `HandleAckReceivedIncorrectSequence`\n\nIntroduce a unit test that verifies BtpEngine\u0027s behavior when an acknowledgment (ACK) is received with an incorrect sequence number. The test simulates sending a multi-fragment message, completes the transmission, and then delivers an ACK with a mismatched sequence.\n\n* Add test `HandleCharacteristicReceivedWithPadding`\n\nAdd a unit test to verify that BtpEngine correctly handles a received packet where the message is smaller than the packet size and includes padding. The test ensures the engine processes the message successfully, updates its state to complete, and preserves the reported packet length.\n\n* Add test `IsValidAckOnSequenceWraparound`\n\nThis test verifies that the BtpEngine correctly handles acknowledgment logic when the fragment sequence number wraps around. It simulates sending enough fragments to trigger a sequence number wrap, injects ACKs at intervals, and checks that invalid ACKs are detected and handled as expected.\n\n* Refactor packet data handling for clarity and consistency\n\n* Add comments for new tests\n\n* Corrections in test `IsValidAckOnSequenceWraparound`\n\n* Corrections in test `HandleCharacteristicReceivedWithPadding`\n\n* Clarify payload length comments",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0928f2f3cbe707eb550b4f037b5a098c0aa76204",
      "old_mode": 33188,
      "old_path": "src/ble/tests/TestBtpEngine.cpp",
      "new_id": "317f0c3c8ecf9647d49b1c6cc2bb0ff53fd8f68d",
      "new_mode": 33188,
      "new_path": "src/ble/tests/TestBtpEngine.cpp"
    }
  ]
}
