Skip to content

Commit

Permalink
Few more tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisVaughan committed Aug 27, 2024
1 parent a2221a9 commit 7fc2123
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions tests/testthat/test-funs.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,24 +97,11 @@ test_that("ptype argument affects type casting", {
between(x, 1.5, 3.5),
c(FALSE, TRUE, TRUE, FALSE, FALSE)
)
expect_snapshot(
between(x, 1.5, 3.5, ptype = integer()),
error = TRUE
)
})


test_that("ptype argument maintains backwards compatibility", {
x <- 1:5

# Should behave the same as before when ptype is NULL
expect_identical(
between(x, 2, 4),
between(x, 2, 4, ptype = NULL)
)
expect_snapshot(error = TRUE, {
between(x, 1.5, 3.5, ptype = integer())
})
})


# cum* --------------------------------------------------------------------

test_that("cum(sum,min,max) return expected results for simple cases", {
Expand Down

0 comments on commit 7fc2123

Please sign in to comment.