tests/testthat/RStanTest/test-add_test.R

context("add_test")

test_that("external C++ code works", {
  n <- sample(1:20, 1)
  x <- rnorm(n)
  y <- rnorm(n)
  expect_equal(add_test(x, y), x + y)
})
stan-dev/rstantools documentation built on Feb. 2, 2025, 11:10 p.m.