Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Aug 11, 2023
1 parent 1cbd702 commit 9289337
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test-sort_linter.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,24 @@ test_that("sort_linter works with multiple lints in a single expression", {

})

test_that("sorted_linter skips usages calling sort arguments", {
test_that("sort_linter skips usages calling sort arguments", {
linter <- sort_linter()

# any arguments to sorted --> not compatible
# any arguments to sort --> not compatible
expect_lint("sort(x, decreasing = TRUE) == x", NULL, linter)
expect_lint("sort(x, na.last = TRUE) != x", NULL, linter)
expect_lint("sort(x, method_arg = TRUE) == x", NULL, linter)
})

test_that("sorted_linter skips when inputs don't match", {
test_that("sort_linter skips when inputs don't match", {
linter <- sort_linter()

expect_lint("sort(x) == y", NULL, linter)
expect_lint("sort(x) == foo(x)", NULL, linter)
expect_lint("sort(foo(x)) == x", NULL, linter)
})

test_that("sorted_linter blocks simple disallowed usages", {
test_that("sort_linter blocks simple disallowed usages", {
linter <- sort_linter()
lint_msg <- rex::rex("Use is.unsorted() to test the (un-)sortedness of a vector.")

Expand Down

0 comments on commit 9289337

Please sign in to comment.