tests/testthat/test-calcularPuntaje.R

test_that("calcularPuntajes", {

  respuestas <- datos[,-1]
  respuestasCorregidas <- corregirRespuestas(respuestas, clave)

  actual <- sum(calcularPuntajes(respuestasCorregidas))
  expected <- 845
  expect_equal(actual, expected)

  actual <- sum(calcularPuntajes(corregirRespuestas(clave, clave)))
  expected <- 50
  expect_equal(actual, expected)

})

Try the itan package in your browser

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

itan documentation built on Feb. 10, 2022, 5:07 p.m.