tests/testthat/test-factorial_loop_001.R

context("Correct Calculations for Factorial")

test_that("The calculations are fine", {
  expect_equal(factorial_loop(4), 24)
  expect_equal(factorial_loop(3), 6)
  expect_equal(factorial_loop(9), 362880)
  expect_equal(factorial_loop(8), factorial(8))
})
mnoro/numpack99 documentation built on May 22, 2019, 2:41 p.m.