tests/testthat/test-totalEmission.R

context("totalEmission")

test_that("total emission calcualtions", {
  expect_equal(totalEmission(vehicles(example = T,verbose = F),
                             emissionFactor(example = T,verbose = F),
                             pol = c("CO","PM"),verbose = F)$CO[[1]],
               units::set_units(2244973629, "g/d"))

  expect_equal(totalEmission(vehicles(example = T,verbose = F),
                             emissionFactor(example = T,verbose = F),
                             pol = "FISH",verbose = F)[[1]],
               units::set_units(0, "g/d"))

})

Try the EmissV package in your browser

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

EmissV documentation built on March 31, 2023, 8:30 p.m.