tests/testthat/test-function-toPositiveIndices.R

test_that("toPositiveIndices() works", {
  
  expect_identical(toPositiveIndices(c(-1, -2), n = 10), c(10, 9))
  expect_identical(toPositiveIndices(c(1, -1), n = 10), c(1, 10))
})
KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.