tests/testthat/test-utils_digits.R

test_that("`utils_digits()` works", {
  expect_equal(utils_digits(x = 0), 0)
  expect_equal(utils_digits(x = 0.2), 1)
  expect_equal(utils_digits(x = 0.23), 2)
  expect_equal(utils_digits(x = 0.234), 3)
})

Try the distantia package in your browser

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

distantia documentation built on April 4, 2025, 5:42 a.m.