tests/testthat/test-calc_combination.R

test_that("Expect equal", {

  expect_equal(
    object = calc_combination(n = 10,r = 4,order_matter = FALSE,with_repetition = TRUE),
    expected = 715
    )

  expect_equal(
    object = calc_combination(n = 10,r = 4,order_matter = FALSE,with_repetition = FALSE),
    expected = 210
  )

  expect_equal(
    object = calc_combination(n = 8,r = 3,order_matter = TRUE,with_repetition = FALSE),
    expected = 336
  )

})
vbfelix/relper documentation built on May 10, 2024, 10:50 p.m.