tests/testthat/test_factors.R

context("factors")
library(testthat)
library(hmi)

#test_check("hmi")

test_that("correct factors are returned", {
  expect_equal(factors(1), 1)
  expect_equal(factors(10), c(1, 2, 5, 10))
  expect_true(is.na(factors(1:10)))
})

Try the hmi package in your browser

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

hmi documentation built on Oct. 23, 2020, 7:31 p.m.