tests/testthat/test-00-misc.R

context("Misc")

test_that("Misc functions work", {
  tt <- c(1,2,4,5)
  expect_equal(splice(tt,3,1),c(3,1,2,4,5))
  expect_equal(splice(tt,3,2),c(1,3,2,4,5))
  expect_equal(splice(tt,3,3),c(1,2,3,4,5))
  expect_equal(splice(tt,3,4),c(1,2,4,3,5))
  expect_equal(splice(tt,3,5),c(1,2,4,5,3))

})

Try the aghq package in your browser

Any scripts or data that you put into this service are public.

aghq documentation built on June 7, 2023, 5:10 p.m.