Skip to content

test: remove 2 redundant generate_stage_prefix tests in compile/job#1098

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
test-reducer/job-prefix-dedup-2464c7eb1cba2fbe
Draft

test: remove 2 redundant generate_stage_prefix tests in compile/job#1098
github-actions[bot] wants to merge 1 commit into
mainfrom
test-reducer/job-prefix-dedup-2464c7eb1cba2fbe

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Test Suite Reduction: src/compile/job.rs

What was wrong

  • test_generate_stage_prefix_single_word: asserts generate_stage_prefix("review") == "Review". The per-word capitalisation is already exercised by test_generate_stage_prefix_hyphens, which verifies "my""My" and "agent""Agent". A single-element result from split() goes through the same map/collect path as a multi-element result — there is no distinct code branch to protect.
  • test_generate_stage_prefix_underscores: asserts generate_stage_prefix("code_review_agent") == "CodeReviewAgent". The separator predicate is !c.is_ascii_alphanumeric(), which treats '_' and '-' identically; the test exercises the same code path as test_generate_stage_prefix_hyphens. The hyphens test is strictly stronger — it also covers a numeric segment ("123""123"), confirming non-letter words are left as-is.

Changes

Test Action Reason
test_generate_stage_prefix_single_word Removed Strict subset of test_generate_stage_prefix_hyphens
test_generate_stage_prefix_underscores Removed Same code path as test_generate_stage_prefix_hyphens; hyphens test is stronger

Verification

  • cargo test 'compile::job::tests': 5 tests pass ✅
  • cargo clippy --all-targets --all-features: no warnings ✅

Generated by Test Reducer · 426.5 AIC · ⌖ 35.5 AIC · ⊞ 36.9K ·

test_generate_stage_prefix_single_word and test_generate_stage_prefix_underscores
are strict subsets of test_generate_stage_prefix_hyphens:

- single_word ("review" → "Review"): the per-word capitalisation path is
  already exercised by hyphens, which processes "my" → "My" and "agent" →
  "Agent". A single-element split is indistinguishable from a multi-element
  split at the map/collect level.

- underscores ("code_review_agent" → "CodeReviewAgent"): the separator
  identical code path. hyphens is the stronger test — it also covers a
  numeric segment ("123" → "123").

Co-authored-by: Copilot <223556219+Copilot@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.

0 participants