Skip to content

Commit

Permalink
Coverage tests of unipos(), keypos()
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelChirico committed Oct 15, 2024
1 parent 3cc2e4b commit da9a96f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/testthat/test-highlevel64.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,11 @@ test_that("Old \\dontshow{} tests continue working", {
expect_identical(table(x=xi64, y=yi), t_xi_yi)
expect_identical(table(x=xi, y=yi64), t_xi_yi)
})

test_that("unipos() works as intended", {
expect_identical(unipos(as.integer64(c(1L, 2L, 1L, 3L, 2L, 4L))), c(1L, 2L, 4L, 6L))
})

test_that("keypos() works as intended", {
expect_identical(keypos(as.integer64(c(5L, 2L, 5L, 3L, 2L, 4L))), c(4L, 1L, 4L, 2L, 1L, 3L))
})

0 comments on commit da9a96f

Please sign in to comment.