tests/testthat/test-sound_speed.R

test_that("function works", { 
  expect_equal(sound_speed(18, 900, 25),1519.23415)
})

test_that("function works", {
  expect_equal(sound_speed(0),1449.06623)
})

test_that("function does not work", {
  expect_error(sound_speed(8, "1000", 34), "non-numeric argument to binary operator")
})

Try the tagtools package in your browser

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

tagtools documentation built on Dec. 19, 2025, 1:06 a.m.