tests/testthat/test-square.R

test_that("multiplication works", {
  expect_equal(2 * 2, 4)
})

test_that("addition works", {
  expect_equal(add(2,2), 4)
})

test_that("cubic works", {
  expect_equal(cubic(2), 8)
})

test_that("cubic works", {
  expect_equal(cubic(3), 27)
})
BangyaoZhao/package1 documentation built on Nov. 17, 2019, 7:36 p.m.