Skip to content

test: improve coverage for core matching logic - #367

Open
RoiSoleil wants to merge 4 commits into
masterfrom
test-coverage-improvements-11794562056622993393
Open

test: improve coverage for core matching logic#367
RoiSoleil wants to merge 4 commits into
masterfrom
test-coverage-improvements-11794562056622993393

Conversation

@RoiSoleil

Copy link
Copy Markdown
Contributor

🎯 What

Added missing unit tests for string utility, parsing and scanning logic within the org.moreunit.core.matching package.

💡 Why

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.

📊 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.

PR created automatically by Jules for task 11794562056622993393 started by @RoiSoleil

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>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 3 commits August 28, 2026 21:17
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant