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"))

})
Schuch666/EmissV documentation built on Dec. 24, 2024, 3:15 a.m.