tests/testthat/test_ode.R

# test_ode.R Copyright 2015 Christian Diener <[email protected]> MIT license.
# See LICENSE for more information.

context("ODE solving")

test_that("timecourse works", {
    data(eryth)
    S <- stoichiometry(eryth)
    x0 <- runif(nrow(S), 0, 1)
    names(x0) <- rownames(S)
    tc <- timecourse(x0, seq(0, 10, 0.1), runif(ncol(S), 0, 1), S)
    expect_equal(tc[, 1], seq(0, 10, 0.1))
    expect_true(all(names(x0) %in% colnames(tc)))
}) 
cdiener/dycone documentation built on Sept. 9, 2018, 1:20 p.m.