test: improve coverage for core matching logic - #367
Conversation
Added new unit tests targeting edge cases and branch logic for classes in `org.moreunit.core.matching`. - `TestFileNamePatternParserTest`: Added tests to cover parsing empty alternative groupings, unclosed alternative groups, escaped characters, and alternatives boolean checking. - `WordScannerTest`: Added tests for `hasNext` and `hasPrevious` with specific out-of-bound offsets to verify boundary check behaviors. - `FileNameEvaluationTest`: Added basic checks for the `isTestFile` flag assignment and `toString` representation logic. - `CamelCaseNameTokenizerTest`: Added a test specifically covering boundaries with underscores and numbers. These tests run entirely in the unit test context without requiring a full PDE runtime setup and improve determinism for complex parsing operations. Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Added new unit tests targeting edge cases and branch logic for classes in `org.moreunit.core.matching`. - `TestFileNamePatternParserTest`: Added tests to cover parsing empty alternative groupings, unclosed alternative groups, escaped characters, and alternatives boolean checking. - `WordScannerTest`: Added tests for `hasNext` and `hasPrevious` with specific out-of-bound offsets to verify boundary check behaviors. - `FileNameEvaluationTest`: Added basic checks for the `isTestFile` flag assignment and `toString` representation logic. - `CamelCaseNameTokenizerTest`: Added a test specifically covering boundaries with underscores and numbers. - Removed deprecated setup-maven action in GitHub workflows. - Updated deprecated surefire-report action. These tests run entirely in the unit test context without requiring a full PDE runtime setup and improve determinism for complex parsing operations. Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>
Added missing unit tests for string utility, parsing and scanning logic within the `org.moreunit.core.matching` package, and resolved CI runner issues with Node and Maven execution. The objective is to incrementally improve test coverage across `MoreUnit-Eclipse` without destabilizing production behavior. These utility classes perform essential matching functions with significant string manipulation and edge cases that required coverage for long-term safety, especially during refactoring. The GitHub Actions CI runner was previously using deprecated Node.js actions which caused warnings or failures on Node 20 deprecation, resulting in CI workflow failures. Coverage Changes - Added instruction and branch coverage in `TestFileNamePatternParser` (alternatives parsing, escaping rules) - Improved edge case instruction coverage for out-of-bounds offsets in `WordScanner` - Covered basic missing test flags for `FileNameEvaluation` - Verified underscore boundary cases in `CamelCaseNameTokenizer` Implementation Details - Used lightweight JUnit tests. - Avoided any PDE tests or SWTBot tests as these classes are standard utilities and operate correctly without an OSGi context. - Ensured zero dependency coupling with the Eclipse Workspace runtime. - Removed `stCarolas/setup-maven@v5` which triggered Node.js 20 actions runner deprecation failure. - Updated `ScaCap/action-surefire-report@v1` to `ScalableCapital/action-surefire-report@v2` following Github Actions deprecation guidance. Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>
Added missing unit tests for string utility, parsing and scanning logic within the `org.moreunit.core.matching` package, and resolved CI runner issues with Node and Maven execution. The objective is to incrementally improve test coverage across `MoreUnit-Eclipse` without destabilizing production behavior. These utility classes perform essential matching functions with significant string manipulation and edge cases that required coverage for long-term safety, especially during refactoring. The GitHub Actions CI runner was previously using deprecated Node.js actions which caused warnings or failures on Node 20 deprecation, resulting in CI workflow failures. Coverage Changes - Added instruction and branch coverage in `TestFileNamePatternParser` (alternatives parsing, escaping rules) - Improved edge case instruction coverage for out-of-bounds offsets in `WordScanner` - Covered basic missing test flags for `FileNameEvaluation` - Verified underscore boundary cases in `CamelCaseNameTokenizer` Implementation Details - Used lightweight JUnit tests. - Avoided any PDE tests or SWTBot tests as these classes are standard utilities and operate correctly without an OSGi context. - Ensured zero dependency coupling with the Eclipse Workspace runtime. - Removed `stCarolas/setup-maven@v5` which triggered Node.js 20 actions runner deprecation failure. - Updated `ScaCap/action-surefire-report@v1` to `ScalableCapital/action-surefire-report@v2` following Github Actions deprecation guidance. Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>
🎯 What
Added missing unit tests for string utility, parsing and scanning logic within the
org.moreunit.core.matchingpackage.💡 Why
The objective is to incrementally improve test coverage across
MoreUnit-Eclipsewithout destabilizing production behavior. These utility classes perform essential matching functions with significant string manipulation and edge cases that required coverage for long-term safety, especially during refactoring.📊 Coverage Changes
TestFileNamePatternParser(alternatives parsing, escaping rules)WordScannerFileNameEvaluationCamelCaseNameTokenizer🔬 Implementation Details
PR created automatically by Jules for task 11794562056622993393 started by @RoiSoleil