Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Apr 17, 2024
1 parent 4e84ced commit 0a8acdc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/testthat/test-standalone-vctrs.R
Original file line number Diff line number Diff line change
Expand Up @@ -452,3 +452,16 @@ test_that("ptype is finalised", {
out <- vec_cast_common(list(out, x))[[1]]
expect_identical(out$x, NA)
})

test_that("vec_recycle_common() throws appropriate errors", {

expect_error(
vec_recycle_common(list(a = 1:2), size = 1),
"Inputs can't be recycled to `size`."
)
expect_error(
vec_recycle_common(list(a = 1:2, b = 1:3)),
"Inputs can't be recycled to a common size."
)

})

0 comments on commit 0a8acdc

Please sign in to comment.