Skip to content

Commit 9e30b6b

Browse files
committed
test new matrix conversion function
1 parent 168fb93 commit 9e30b6b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/testthat/test_convert_data.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,3 +620,10 @@ test_that("bad args", {
620620
)
621621
})
622622

623+
## -----------------------------------------------------------------------------
624+
625+
test_that("convert to matrix", {
626+
expect_true(inherits(parsnip::as_matrix(mtcars), "matrix"))
627+
expect_true(inherits(parsnip::as_matrix(tibble::as_tibble(mtcars)), "matrix"))
628+
expect_true(inherits(parsnip::as_matrix(as.matrix(mtcars)), "matrix"))
629+
})

0 commit comments

Comments
 (0)