diff --git a/nimbleHMC/tests/testthat/test-tuning.R b/nimbleHMC/tests/testthat/test-tuning.R index 3d6d5e8..44a833f 100644 --- a/nimbleHMC/tests/testthat/test-tuning.R +++ b/nimbleHMC/tests/testthat/test-tuning.R @@ -466,10 +466,10 @@ test_that('burnin/warmup are handled correctly', { Cmcmc <- compileNimble(Rmcmc, project = Rmodel) expect_output(out <- runMCMC(Cmcmc, nburnin = 200, niter = 1000), - regex = "using 200 warmup iterations.*all samples returned will be post-warmup") + regex = "using 200.*all samples returned will be post-warmup") expect_output(out <- runMCMC(Cmcmc, niter = 1000), - regex = "using 500 warmup iterations.*so the first half of the samples returned.*are from the warmup period") + regex = "using 500.*so the first half of the samples returned.*are from the warmup period") ## 'burnin' Rmodel <- nimbleModel(code, constants, data, inits, buildDerivs = TRUE) @@ -482,7 +482,7 @@ test_that('burnin/warmup are handled correctly', { Cmcmc <- compileNimble(Rmcmc, project = Rmodel) expect_output(out <- runMCMC(Cmcmc, niter = 1000), - regex = "using 0 warmup iterations.*No adaptation is being done") + regex = "using 0.*No adaptation is being done") Rmodel <- nimbleModel(code, constants, data, inits, buildDerivs = TRUE) Cmodel <- compileNimble(Rmodel) @@ -494,7 +494,7 @@ test_that('burnin/warmup are handled correctly', { Cmcmc <- compileNimble(Rmcmc, project = Rmodel) expect_output(out <- runMCMC(Cmcmc, nburnin = 200, niter = 1000), - regex = "using 200 warmup iterations.*all samples returned will be post-warmup") + regex = "using 200.*all samples returned will be post-warmup") ## 'fraction' Rmodel <- nimbleModel(code, constants, data, inits, buildDerivs = TRUE) @@ -507,7 +507,7 @@ test_that('burnin/warmup are handled correctly', { Cmcmc <- compileNimble(Rmcmc, project = Rmodel) expect_output(out <- runMCMC(Cmcmc, niter = 1000), - regex = "using 250 warmup iterations.*some of the samples returned will be collected during the warmup period") + regex = "using 250.*some of the samples returned will be collected during the warmup period") Rmodel <- nimbleModel(code, constants, data, inits, buildDerivs = TRUE) Cmodel <- compileNimble(Rmodel) @@ -519,7 +519,7 @@ test_that('burnin/warmup are handled correctly', { Cmcmc <- compileNimble(Rmcmc, project = Rmodel) expect_output(out <- runMCMC(Cmcmc, nburnin = 100, niter = 1000), - regex = "using 250 warmup iterations.*some of the samples returned will be collected during the warmup period") + regex = "using 250.*some of the samples returned will be collected during the warmup period") Rmodel <- nimbleModel(code, constants, data, inits, buildDerivs = TRUE) Cmodel <- compileNimble(Rmodel) @@ -531,7 +531,7 @@ test_that('burnin/warmup are handled correctly', { Cmcmc <- compileNimble(Rmcmc, project = Rmodel) expect_output(out <- runMCMC(Cmcmc, nburnin = 250, niter = 1000), - regex = "using 250 warmup iterations.*all samples returned will be post-warmup") + regex = "using 250.*all samples returned will be post-warmup") ## 'iterations' Rmodel <- nimbleModel(code, constants, data, inits, buildDerivs = TRUE) @@ -544,7 +544,7 @@ test_that('burnin/warmup are handled correctly', { Cmcmc <- compileNimble(Rmcmc, project = Rmodel) expect_output(out <- runMCMC(Cmcmc, niter = 1000), - regex = "using 500 warmup iterations.*some of the samples returned will be collected during the warmup period") + regex = "using 500.*some of the samples returned will be collected during the warmup period") Rmodel <- nimbleModel(code, constants, data, inits, buildDerivs = TRUE) Cmodel <- compileNimble(Rmodel) @@ -556,7 +556,7 @@ test_that('burnin/warmup are handled correctly', { Cmcmc <- compileNimble(Rmcmc, project = Rmodel) expect_output(out <- runMCMC(Cmcmc, nburnin = 500, niter = 1000), - regex = "using 500 warmup iterations.*all samples returned will be post-warmup") + regex = "using 500.*all samples returned will be post-warmup") ## no adaptation Rmodel <- nimbleModel(code, constants, data, inits, buildDerivs = TRUE)