tests/testthat/test-calc_mcv.R

testthat::test_that('Verificando função calc_mcv', {
  testthat::expect_equal(calc_mcv(40, 5), 80.0)
  testthat::expect_equal(calc_mcv(30, 3), 100.0)
  testthat::expect_error(calc_mcv())
  testthat::expect_error(calc_mcv(-10, 50))
  testthat::expect_error(calc_mcv(10, -50))
  testthat::expect_error(calc_mcv(10, 0))
  })

Try the hemat package in your browser

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

hemat documentation built on Feb. 18, 2026, 5:07 p.m.