tests: add edge-case tests for str_sort(), str_order(), and str_rank()#612
Closed
LeonidasZhak wants to merge 1 commit into
Closed
tests: add edge-case tests for str_sort(), str_order(), and str_rank()#612LeonidasZhak wants to merge 1 commit into
LeonidasZhak wants to merge 1 commit into
Conversation
Add tests for: - Empty input (character(0)) for all three functions - Single element input - All NA input - NA dropping with na_last = NA - Decreasing order - Mixed case sorting - Names preservation for str_order() - Single NA handling
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds edge-case tests for
str_sort(),str_order(), andstr_rank()covering common data cleaning scenarios that had limited test coverage.Changes
tests/testthat/test-sort.R: +77 lines (14 new test blocks, 28 new expectations)Tests Added
character(0)for all three functionsstr_sort(),str_order(),str_rank()str_sort()withna_last = TRUEandna_last = FALSEstr_sort()withna_last = NAstr_sort()andstr_order()str_sort()with default localestr_order()preserves names through indexingstr_sort()with variousna_lastoptionsValidation
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 31 ](28 existing + 14 new)Related