Skip to content

test: add edge-case tests for fct_rev()#399

Closed
LeonidasZhak wants to merge 1 commit into
tidyverse:mainfrom
LeonidasZhak:tests/fct-rev-edge-cases
Closed

test: add edge-case tests for fct_rev()#399
LeonidasZhak wants to merge 1 commit into
tidyverse:mainfrom
LeonidasZhak:tests/fct-rev-edge-cases

Conversation

@LeonidasZhak

Copy link
Copy Markdown

Summary

Adds edge-case test coverage for fct_rev(), which previously had only 1 test.

Tests Added

  1. NA values: Verifies NA positions are preserved after level reversal
  2. Empty factor: Verifies empty input returns empty factor with no levels
  3. Single level: Verifies single-level factor is unchanged
  4. Unused levels: Verifies unused levels are reversed correctly
  5. Ordered class: Verifies ordered factor class is preserved

Tests Run

[ FAIL 0 | WARN 0 | SKIP 0 | PASS 10 ]

All 10 tests in test-rev.R pass (1 existing + 5 new). Full suite: 229 PASS, 0 FAIL.

- NA values: verify NA positions preserved after level reversal
- Empty factor: verify empty input returns empty factor
- Single level: verify single-level factor unchanged
- Unused levels: verify unused levels are reversed correctly
- Ordered class: verify ordered factor class is preserved
@LeonidasZhak

Copy link
Copy Markdown
Author

Withdrawing this small automated PR while I consolidate an oversized batch of contributions and reduce maintainer review burden. Sorry for the noise, and thank you for maintaining the project.

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