tests/testthat/test-convertFileSizes.R

context("convertFileSizes")

test_that("Reject invalid input", {
  expect_error(convert2bytes(1, "dog"))
})

test_that("RH is within limits", {
  expect_equal(convert2bytes(8, input="bits"), 1)
  expect_equal(convert2bytes(1, input="bytes"), 1)
})

Try the sonicscrewdriver package in your browser

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

sonicscrewdriver documentation built on May 2, 2021, 5:06 p.m.