test: improve generator coverage#500
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
This PR increases unit test coverage for the source generators—specifically expanding scenario coverage for the CompensatingTransactionGenerator and DecoratorGenerator to exercise additional edge cases (type shapes/accessibility and emitted literal/name escaping).
Changes:
- Added DecoratorGenerator tests for inaccessible protected members and for preserving additional default literal forms (nullable/default/null, enum named defaults, floating-point special values).
- Added CompensatingTransactionGenerator tests covering additional host type shapes/accessibilities and string escaping in generated output.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/PatternKit.Generators.Tests/DecoratorGeneratorTests.cs | Adds scenarios for PKDEC004 (inaccessible protected property) and expands literal/default-value emission assertions. |
| test/PatternKit.Generators.Tests/CompensatingTransactionGeneratorTests.cs | Adds scenarios validating generation across multiple host shapes/accessibilities and escaped names in emitted code. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 12 files 12 suites 12m 20s ⏱️ Results for commit f1cee65. ♻️ This comment has been updated with latest results. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #500 +/- ##
==========================================
+ Coverage 97.40% 97.44% +0.03%
==========================================
Files 611 611
Lines 49926 49926
Branches 3230 34 -3196
==========================================
+ Hits 48631 48650 +19
+ Misses 1295 1276 -19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 PR Validation ResultsVersion: `` ✅ Validation Steps
📊 ArtifactsDry-run artifacts have been uploaded and will be available for 7 days. This comment was automatically generated by the PR validation workflow. |
e38fb20 to
f1cee65
Compare
Code Coverage |
Closes #413
Summary
Local coverage delta
Validation