inst/examplepkg/tests/testthat/test-hypotenuse.R

test_that("hypotenuse is calculated correctly", {
  expect_equal(hypotenuse(3, 4), 5)

  test_that("with negative lengths", {
    expect_equal(hypotenuse(-3, -4), 5)  
  })
})

Try the covtracer package in your browser

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

covtracer documentation built on Sept. 12, 2024, 7:40 a.m.