Repository navigation
Add Unit Tests for Track and Closed Caption Property Edge Cases - #1186
Conversation
Cover the track property paths the corpus runs do not reach: codec fallbacks for non-Matroska containers, missing-codec rejection, every track flag, ISO language set from an IETF tag, MediaInfo sub-track stream order, closed caption sub-tracks, VobSub without a muxing mode, and cover art removal. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 24 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. CodeRabbit Verify
|
PR Summary by QodoCover track creation and closed-caption property edge cases
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can tweak Display settings with a live preview to see your comment before it ships |
There was a problem hiding this comment.
🟢 Approval recommended
The change is limited to focused unit tests covering previously untested TrackProps and MediaInfo closed-caption edge cases without modifying production behavior.
No open issues 🎉
What changed in this PR
Adds focused unit tests for previously uncovered TrackProps creation and MediaInfo closed-caption edge cases without changing production behavior.
Changes:
- Tests codec fallbacks, unsupported tracks, flags, language handling, missing IDs, and stream-order parsing across MkvMerge, FFprobe, and MediaInfo.
- Tests embedded, separate, unknown, unparsable, and VobSub caption paths, including warning and removal behavior.
- Covers phase 6 of the planned test-coverage work.
| File | Description |
|---|---|
PlexCleanerTests/TrackPropsCreateTests.cs |
Tests track-creation edge cases across MkvMerge, FFprobe, and MediaInfo. |
PlexCleanerTests/SubtitlePropsClosedCaptionsTests.cs |
Tests MediaInfo closed-caption handling and VobSub removal behavior. |
Review effort: Lite
Adds unit tests for track property paths that the real-tool corpus runs don't reach.
TrackPropsCreateTests, one case each for the MkvMerge, FfProbe, and MediaInfoCreateoverloads:Unsupported.StreamOrder, which is either sanitized or rejected.SubtitlePropsClosedCaptionsTestscovers the MediaInfo closed caption sub-track paths:This is phase 6 of the coverage plan on the
coveragetrack (#1171), group B. Against Codecov's missed lines at the phase 5 measurement, these tests cover 125 of 150 inTrackProps.csand 69 of 71 inSubtitleProps.cs.Some uncovered code is unreachable or unused, so it is filed as #1185 rather than tested:
SetLanguage's empty-lookup branches can't run, since the language lookup returnsundfor an unknown tag.SetLanguagenever returns false.TrackProps.GetFlags()andMediaProps.RemoveCoverArt()have no caller.Verification: the .NET Format chain is clean, and the unit suite passes (520 tests). The local strict review ran twice: the first pass raised 6 findings, all fixed, and the second raised none.
🤖 Generated with Claude Code