 c("common_functions.stan",
 "bernoulli_likelihoods.stan",
 "binomial_likelihoods.stan",
 "continuous_likelihoods.stan",
 "count_likelihoods.stan",
 "SSfunctions.stan")),
 FUN = readLines)), unlist(functions))
 model_code < paste(c("functions {", functions, "}"), collapse = "\n")
 stanc_ret < stanc(model_code = model_code, model_name = "Stan Functions",
 allow_undefined = TRUE)
 expose_stan_functions(stanc_ret, rebuild = TRUE)
 Rcpp::sourceCpp(file.path(INCLUDE_DIR, "tests.cpp"), rebuild = TRUE)
 N < 99L

 # bernoulli
 links < c("logit", "probit", "cauchit", "log", "cloglog")

 context("Bernoulli")
 test_that("linkinv_bern returns expected results", {
 for (i in 1:length(links)) {
 eta < abs(rnorm(N))