tests/testthat/test_stopover_mass_calculator.R

context("stopover mass calculator")

test_that("mismatch length throw error", {
  expect_error(stopover.mass.calculator(bodyMass = c(1.1,1.2), fatMass = c(0.34),
                                        taxon = c(1, 2), duration = 24L
  ))
})


test_that("negaative duration throws error", {
  expect_error(stopover.mass.calculator(bodyMass = c(1.1,1.2), fatMass = c(0.34, 0.25),
                                        taxon = c(1, 2), duration = -24L
  ))
})


test_that("negaative duration throws error", {
  expect_error(stopover.mass.calculator(bodyMass = c(1.1,1.2), fatMass = c(0.34, 0.25),
                                        taxon = c(1, 3), duration = 24L
  ))
})

Try the FlyingR package in your browser

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

FlyingR documentation built on June 28, 2022, 1:06 a.m.