test: align case changer dash assertions with the shipped behavior #5

Merged
forge-recovery merged 1 commits from fix/case-changer-dash-assertions into develop 2026-11-01 20:27:45 +00:00
Owner

Problem

verify fails in :test: CaseChangerActionTest.testToWords (line 50) and testToSubWords (line 63) fail; 17 run, 2 failed. This is a real test failure (Gradle/test reports uploaded in run #2352), not an infrastructure problem.

Root cause

Both assertions expect dashes to be word characters / sub-word separators (one-two is one word; foo-bar splits). The code does not do that: isWordPart has the dash commented out and the LOWER_CASE_DASHES / UPPER_CASE_DASHES transforms are commented out. The tests and that disabling were introduced together in d215d76 (which also removed the CircleCI config), so these assertions never passed in CI. They also conflict with testReplacementText, which asserts "foo-bar" with CAMEL_CASE stays "foo-bar"; that only holds when dashes are separators. No consistent behavior satisfies all three.

Fix

Update the two stale assertions to the shipped behavior (dash is a separator, not a word part / not a sub-word separator) with a comment pointing at the disabled feature. Assertion count is unchanged; nothing is skipped, ignored or loosened. Production code is untouched.

Reviewer note

This changes what two tests assert. If dash support was meant to ship, the alternative is to implement it and revise testReplacementText; this PR deliberately does not make that product change.

Verification

./gradlew test: 17 tests, 0 failures, 0 skipped.

🤖 Generated with Claude Code

## Problem `verify` fails in `:test`: `CaseChangerActionTest.testToWords` (line 50) and `testToSubWords` (line 63) fail; 17 run, 2 failed. This is a real test failure (Gradle/test reports uploaded in run #2352), not an infrastructure problem. ## Root cause Both assertions expect dashes to be word characters / sub-word separators (`one-two` is one word; `foo-bar` splits). The code does not do that: `isWordPart` has the dash commented out and the `LOWER_CASE_DASHES` / `UPPER_CASE_DASHES` transforms are commented out. The tests and that disabling were introduced together in d215d76 (which also removed the CircleCI config), so these assertions never passed in CI. They also conflict with `testReplacementText`, which asserts `"foo-bar"` with `CAMEL_CASE` stays `"foo-bar"`; that only holds when dashes are separators. No consistent behavior satisfies all three. ## Fix Update the two stale assertions to the shipped behavior (dash is a separator, not a word part / not a sub-word separator) with a comment pointing at the disabled feature. Assertion count is unchanged; nothing is skipped, ignored or loosened. Production code is untouched. ## Reviewer note This changes what two tests assert. If dash support was meant to ship, the alternative is to implement it and revise `testReplacementText`; this PR deliberately does not make that product change. ## Verification `./gradlew test`: 17 tests, 0 failures, 0 skipped. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
forge-recovery added 1 commit 2026-11-01 19:39:56 +00:00
test: align case changer dash assertions with the shipped behavior
KofTwentyTwo/ci-policy: ci / fork-guard (pull_request) Skipped
KofTwentyTwo/ci-policy: ci / gradle-1 (pull_request) Skipped
KofTwentyTwo/ci-policy: ci / java-docker-2 (pull_request) Skipped
KofTwentyTwo/ci-policy: ci / java-maven-3 (pull_request) Skipped
KofTwentyTwo/ci-policy: ci / manifests-4 (pull_request) Skipped
KofTwentyTwo/ci-policy: ci / node-5 (pull_request) Skipped
KofTwentyTwo/ci-policy: ci / rust-6 (pull_request) Skipped
KofTwentyTwo/ci-policy: ci / rust-7 (pull_request) Skipped
KofTwentyTwo/ci-policy: ci / rust-8 (pull_request) Skipped
KofTwentyTwo/ci-policy: ci / source-config-9 (pull_request) Skipped
KofTwentyTwo/ci-policy: ci / not-enrolled (pull_request) Skipped
KofTwentyTwo/ci-policy: Shared Gradle CI / secrets (pull_request) Successful in 35s
KofTwentyTwo/ci-policy: Shared Gradle CI / verify (pull_request) Successful in 10m49s
KofTwentyTwo/ci-policy: Shared Gradle CI / gate (pull_request) Successful in 24s
KofTwentyTwo/ci-policy: ci / gradle-0 (pull_request) Successful in 11m18s
KofTwentyTwo/ci-policy: ci / ci-result (pull_request) Successful in 10s
34756759b8
testToWords and testToSubWords asserted that a dash is part of a word and a
sub-word separator. Dash handling is intentionally disabled in the same
upstream commit that added these tests (isWordPart and the *_DASHES
transforms are commented out), and testReplacementText asserts
"foo-bar" -> CAMEL_CASE stays "foo-bar", which only holds when dashes are
separators. The three assertions cannot all hold, so the two stale ones now
describe the shipped behavior. Assertion count is unchanged; no test is
skipped or disabled. Gradle test: 17 run, 0 failed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
forge-recovery merged commit 4e13722fb8 into develop 2026-11-01 20:27:45 +00:00
Sign in to join this conversation.