Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-buerkner committed Sep 26, 2023
1 parent a587ba6 commit 7d4e18e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/tests.make_stancode.R
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ test_that("make_stancode is correct for non-linear matrix covariates", {

# integer matrix
nlfun_stan_int <- "
real nlfun(real a, real b, real c, int[] X) {
real nlfun(real a, real b, real c, array[] int X) {
return a + b * X[1] + c * X[2];
}
"
Expand Down Expand Up @@ -2204,7 +2204,7 @@ test_that("argument 'stanvars' is handled correctly", {
stanvars = stanvars, threads = threading(2),
parse = FALSE)
expect_match2(scode,
"partial_log_lik_lpmf(int[] seq, int start, int end, data int[] Y, real Intercept, data real foo, real tau)"
"partial_log_lik_lpmf(array[] int seq, int start, int end, data array[] int Y, real Intercept, data real foo, real tau)"
)
expect_match2(scode,
"reduce_sum(partial_log_lik_lpmf, seq, grainsize, Y, Intercept, foo, tau)"
Expand Down Expand Up @@ -2347,7 +2347,7 @@ test_that("custom families are handled correctly", {
loop = FALSE
)
stan_funs_vec <- "
real beta_binomial2_vec_lpmf(int[] y, vector mu, real phi, int[] N, real[] R) {
real beta_binomial2_vec_lpmf(array[] int y, vector mu, real phi, array[] int N, array[] real R) {
return beta_binomial_lpmf(y | N, mu * phi, (1 - mu) * phi);
}
int beta_binomial2_rng(real mu, real phi, int N, real R) {
Expand Down

0 comments on commit 7d4e18e

Please sign in to comment.