tests/testthat/tests.gerais.R

library(pacote)
context("Soma")

test_that("soma está correta", {
  expect_equal(soma(c(1,2,3)), 6)
})
curso-r/pacote documentation built on May 14, 2019, 12:52 p.m.