Skip to content

Commit 97d1142

Browse files
committed
Update test
1 parent 6cae03a commit 97d1142

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/testthat/test-model-methods.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,16 @@ test_that("Variable skeleton returns correct dimensions for matrices", {
297297
}")
298298
mod <- cmdstan_model(stan_file, compile_model_methods = TRUE,
299299
force_recompile = TRUE)
300-
fit <- mod$sample(data = list(N = 4, K = 3), chains = 1,
300+
N <- 4
301+
K <- 3
302+
fit <- mod$sample(data = list(N = N, K = K), chains = 1,
301303
iter_warmup = 1, iter_sampling = 1)
302304

303305
target_skeleton <- list(
304306
x_real = array(0, dim = 1),
305-
x_mat = array(0, dim = c(4, 3)),
306-
x_vec = array(0, dim = c(3)),
307-
x_rowvec = array(0, dim = c(3))
307+
x_mat = array(0, dim = c(N, K)),
308+
x_vec = array(0, dim = K),
309+
x_rowvec = array(0, dim = K)
308310
)
309311

310312
expect_equal(fit$variable_skeleton(),

0 commit comments

Comments
 (0)