[Tests] Improve branch coverage for DAO deserializeStringSet and updateTable - #91
[Tests] Improve branch coverage for DAO deserializeStringSet and updateTable#91DiamondDagger590 wants to merge 1 commit into
Conversation
Add 12 new tests to PlayerStatisticDAOSerializationTest targeting uncovered branches in deserializeStringSet: whitespace handling, unquoted elements, unknown escape sequences, backslash at end of input, mixed quoted/unquoted elements, and trailing whitespace after elements. Add negative-version updateTable tests to both PlayerStatisticDAOTest and PlayerSettingDAOTest to cover the early-return branch when lastStoredVersion is negative. Branch coverage improvements: - PlayerStatisticDAO: 78.7% → 93.3% - PlayerSettingDAO: 78.6% → 82.1% Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014b6qnsbfJn8LQCimGKKLY4
|
Claude finished @DiamondDagger590's task in 5m 10s —— View job PR Review: No blocking issues found
This PR only adds tests (no Summary: 14 new tests target genuinely uncovered branches — the No blocking issues found. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: QUIET Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe pull request adds regression tests for negative table versions in two DAOs. It also adds nested branch-coverage tests for ChangesDAO test coverage
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Summary
PlayerStatisticDAOSerializationTesttargeting previously uncovered paths indeserializeStringSet: whitespace handling, unquoted elements, unknown escape sequences, backslash at end of input, mixed quoted/unquoted parsing, and trailing whitespaceupdateTabletests to bothPlayerStatisticDAOTestandPlayerSettingDAOTestcovering the early-return branch whenlastStoredVersionis negativeCoverage Impact
PlayerStatisticDAOPlayerSettingDAORemaining uncovered branches are JaCoCo bytecode artifacts (try-with-resources null checks, switch exhaustiveness default branches) that are impractical to exercise.
Test plan
./gradlew testGenerated by Claude Code
Summary by CodeRabbit