tests/testthat/test_read_model_json.R

test_that("read_model_json can read JSON and escape characters", {
  dat <- read_model_json(test_path("sample_json", "test_1cmt_iv.json5"))
  expect_equal(dat$equations, "\n\nfrac{dA_1}{dt} = -(CL/V) \n\ncdot A_1")
  expect_equal(dat$ode_code, "\n    dAdt[0] = -(CL/V)*A[0];")
})

Try the PKPDsim package in your browser

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

PKPDsim documentation built on March 7, 2023, 5:40 p.m.