tests/testthat/test-conv-mg-n-bio-t.R

context("get_conv_mgnbiot test extraction of conversion factor")

d <- system.file("extdata", "setas-model-new-trunk", package = "atlantistools")
dd <- file.path(d, "VMPA_setas_biol_fishing_Trunk.prm")

test_that("test conversion factor and helper functions", {
  expect_error(extract_prm(dd, variables = "XYZABC"), "Variable XYZABC")
  expect_error(extract_prm(dd, variables = "FVD"), "found multiple times.")

  expect_equal(extract_prm(dd, variables = "X_CN"), 5.7)
  expect_equal(extract_prm(dd, variables = "mum_ZG_T15"), 0.02)

  expect_equal(get_conv_mgnbiot(dd), 1.14e-07)
})

Try the atlantistools package in your browser

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

atlantistools documentation built on Aug. 16, 2017, 9:05 a.m.