Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make type.character error for NA_character_ #566

Merged

Conversation

nash-delcamp-slp
Copy link
Contributor

Fixes #546

Copy link
Member

@hadley hadley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! My main comment is that I think you can simplify your code a little.

Could you please also add a news bullet to the top of NEWS.md? It should briefly describe the change and end with (@yourname, #issuenumber).

R/modifiers.R Outdated Show resolved Hide resolved
R/modifiers.R Outdated Show resolved Hide resolved

test_that("useful error message for vector that includes NAs", {
expect_snapshot(error = TRUE, {
type(c("a", "b", NA_character_, "c"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great test!

@hadley hadley merged commit b511603 into tidyverse:main Aug 20, 2024
11 checks passed
@hadley
Copy link
Member

hadley commented Aug 20, 2024

Thanks for working on this! I hope you had fun at TDD 😁

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.

Behavior of str_remove when called with NA_character_ pattern
2 participants