tests/testthat/test-cpp-composite.R

context("integrate.cpp unit tests")
library("pracma")

f <- function(x) x * x
t <- seq(1, 15)
n.t <- length(t)
y <- f(t)

test_that("trapz",{
  expect_equal(hesim:::C_test_trapz(t, y), pracma::trapz(t, y))
})

Try the hesim package in your browser

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

hesim documentation built on Sept. 4, 2022, 1:06 a.m.