inst/tinytest/test-units2km.R

#context "test-units2km")
units2km <- hutilscpp:::units2km
# test_that("units2km works", {
  expect_equal(units2km("30km"), 30)
  expect_equal(units2km("30.0 km"), 30)
  expect_equal(units2km("305 m"), 0.305)

Try the hutilscpp package in your browser

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

hutilscpp documentation built on Oct. 11, 2023, 9:06 a.m.