tests/testthat/test-homework-1.r

library(testthat)

context("Test the output of homework 1.")

test_that("The updated version of linear_model works.", {
  data(lm_patho)
  fit_linear_model <- linear_model(y ~., lm_patho)
  fit_lm <- lm(y ~., lm_patho)
  expect_equivalent(fit_lm$coefficients, fit_linear_model$coefficients)
})
casxue/bis557 documentation built on May 7, 2019, 5 a.m.