Running ‘testthat.R’ [17s/31s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > library(rstansim)
  Loading required package: Rcpp
  > 
  > test_check("rstansim")
  ── 1. Error: single_sim testing with stansim_data input (@test-single_sim.R#426)
  StanHeaders version is ahead of rstan version; see https://github.com/stan-dev/rstan/wiki/RStan-Transition-Periods
  1: capture_output(test_stanfit <- rstan::stan_model(file = "data-raw/simtestreg.stan")) at testthat/test-single_sim.R:426
  2: capture_output_lines(code, print, width = width)
  3: eval_with_output(code, print = print, width = width)
  4: withr::with_output_sink(temp, withVisible(code))
  5: force(code)
  6: withVisible(code)
  7: rstan::stan_model(file = "data-raw/simtestreg.stan")
  8: stop("StanHeaders version is ahead of rstan version; ", "see https://github.com/stan-dev/rstan/wiki/RStan-Transition-Periods")
  
  ── 2. Error: stansim test with stansim_data object; cache FALSE, loo FALSE (@tes
  StanHeaders version is ahead of rstan version; see https://github.com/stan-dev/rstan/wiki/RStan-Transition-Periods
  1: capture_output(ss_data <- simulate_data(file = "data-raw/simtestreg.stan", data_name = "saved stansim_data", 
         input_data = reg_data, nsim = 1, path = "testdir", param_values = test_vals, 
         vars = c("sim_x", "sim_y", "N"), use_cores = 1)$datasets) at testthat/test-stansim_external_functions.R:805
  2: capture_output_lines(code, print, width = width)
  3: eval_with_output(code, print = print, width = width)
  4: withr::with_output_sink(temp, withVisible(code))
  5: force(code)
  6: withVisible(code)
  7: simulate_data(file = "data-raw/simtestreg.stan", data_name = "saved stansim_data", 
         input_data = reg_data, nsim = 1, path = "testdir", param_values = test_vals, 
         vars = c("sim_x", "sim_y", "N"), use_cores = 1)
  8: rstan::stan_model(file = file)
  9: stop("StanHeaders version is ahead of rstan version; ", "see https://github.com/stan-dev/rstan/wiki/RStan-Transition-Periods")
  
  ── 3. Error: stansim test with stansim_data object; cache TRUE, loo FALSE (@test
  StanHeaders version is ahead of rstan version; see https://github.com/stan-dev/rstan/wiki/RStan-Transition-Periods
  1: capture_output(ss_data <- simulate_data(file = "data-raw/simtestreg.stan", data_name = "saved stansim_data", 
         input_data = reg_data, nsim = 1, path = "testdir", param_values = test_vals, 
         vars = c("sim_x", "sim_y", "N"), use_cores = 1)$datasets) at testthat/test-stansim_external_functions.R:994
  2: capture_output_lines(code, print, width = width)
  3: eval_with_output(code, print = print, width = width)
  4: withr::with_output_sink(temp, withVisible(code))
  5: force(code)
  6: withVisible(code)
  7: simulate_data(file = "data-raw/simtestreg.stan", data_name = "saved stansim_data", 
         input_data = reg_data, nsim = 1, path = "testdir", param_values = test_vals, 
         vars = c("sim_x", "sim_y", "N"), use_cores = 1)
  8: rstan::stan_model(file = file)
  9: stop("StanHeaders version is ahead of rstan version; ", "see https://github.com/stan-dev/rstan/wiki/RStan-Transition-Periods")
  
  ── 4. Error: (unknown) (@test-stansim_simulate-utilities.R#4)  ─────────────────
  StanHeaders version is ahead of rstan version; see https://github.com/stan-dev/rstan/wiki/RStan-Transition-Periods
  1: capture_output(compiled_model <- rstan::stan_model(file = "data-raw/simtestreg.stan")) at testthat/test-stansim_simulate-utilities.R:4
  2: capture_output_lines(code, print, width = width)
  3: eval_with_output(code, print = print, width = width)
  4: withr::with_output_sink(temp, withVisible(code))
  5: force(code)
  6: withVisible(code)
  7: rstan::stan_model(file = "data-raw/simtestreg.stan")
  8: stop("StanHeaders version is ahead of rstan version; ", "see https://github.com/stan-dev/rstan/wiki/RStan-Transition-Periods")
  
  ── 5. Error: simulate_data returns correct output (@test-stansim_simulate.R#135)
  StanHeaders version is ahead of rstan version; see https://github.com/stan-dev/rstan/wiki/RStan-Transition-Periods
  1: capture_output(output1 <- simulate_data(file = "data-raw/simtestreg.stan", data_name = "test data", 
         input_data = reg_data, vars = c("sim_x", "sim_y", "N"), path = "testdir", param_values = test_vals, 
         nsim = 5)) at testthat/test-stansim_simulate.R:135
  2: capture_output_lines(code, print, width = width)
  3: eval_with_output(code, print = print, width = width)
  4: withr::with_output_sink(temp, withVisible(code))
  5: force(code)
  6: withVisible(code)
  7: simulate_data(file = "data-raw/simtestreg.stan", data_name = "test data", input_data = reg_data, 
         vars = c("sim_x", "sim_y", "N"), path = "testdir", param_values = test_vals, 
         nsim = 5)
  8: rstan::stan_model(file = file)
  9: stop("StanHeaders version is ahead of rstan version; ", "see https://github.com/stan-dev/rstan/wiki/RStan-Transition-Periods")
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 1062 SKIPPED: 0 FAILED: 5
  1. Error: single_sim testing with stansim_data input (@test-single_sim.R#426) 
  2. Error: stansim test with stansim_data object; cache FALSE, loo FALSE (@test-stansim_external_functions.R#805) 
  3. Error: stansim test with stansim_data object; cache TRUE, loo FALSE (@test-stansim_external_functions.R#994) 
  4. Error: (unknown) (@test-stansim_simulate-utilities.R#4) 
  5. Error: simulate_data returns correct output (@test-stansim_simulate.R#135) 
  
  Error: testthat unit tests failed
  Execution halted