tests/testthat/test-soft.R

context("test-soft")

test_that("soft works", {
  expect_equal(soft(3,1), 2)
  expect_equal(soft(-3,1),-2)
  expect_equal(soft(-1,2),0)
})

test_that("hard works", {
  expect_equal(hard(3,1), 3)
  expect_equal(hard(-3,1),-3)
  expect_equal(hard(-1,2),0)
})
jiayiwang1017/Test_package documentation built on May 28, 2019, 6:32 p.m.