tests/testthat/test-ef_eea.R

context("ef_eea")


test_that("ef_eea works", {
  expect_equal(round(ef_eea(category = "PC",
                            fuel = "G",
                            segment = "Small",
                            euro = "I",
                            tech = NA,
                            pol = "CO",
                            mode = NA,
                            slope = 0,
                            load = 0)(10)),
                5
               )
})


test_that("ef_eea works", {
  expect_equal(round(ef_eea(category = "PC",
                            fuel = "D",
                            segment = "Small",
                            euro = "I",
                            tech = NA,
                            pol = "CO",
                            mode = NA,
                            slope = 0,
                            load = 0)(10)),
               1
  )
})

test_that("ef_eea works", {
  expect_equal(round(ef_eea(category = "TRUCKS",
                            fuel = "D",
                            segment = "Rigid <=7.5 t",
                            euro = "I",
                            tech = NA,
                            pol = "NOx",
                            mode = NA,
                            slope = 0,
                            load = 0)(10)),
               4
  )
})

Try the vein package in your browser

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

vein documentation built on April 30, 2023, 1:10 a.m.