Skip to content

Commit

Permalink
Add a test for allow empty
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed Aug 18, 2024
1 parent ccdc266 commit a7bf9bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-standalone-types-check.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ test_that("`check_character()` checks", {
expect_null(check_character(chr()))
expect_null(check_character("foo"))
expect_null(check_character(letters))
expect_null(check_character(NULL, allow_null = TRUE))
expect_null(check_character(NULL, allow_null = TRUE, allow_empty = FALSE))

expect_snapshot({
err(checker(, check_character))
Expand All @@ -177,7 +177,7 @@ test_that("`check_logical()` checks", {
expect_null(check_logical(na_lgl))
expect_null(check_logical(lgl()))
expect_null(check_logical(c(TRUE, FALSE, NA)))
expect_null(check_logical(NULL, allow_null = TRUE))
expect_null(check_logical(NULL, allow_null = TRUE, allow_empty = FALSE))

expect_snapshot({
err(checker(, check_logical))
Expand Down

0 comments on commit a7bf9bb

Please sign in to comment.