Skip to content

Commit 7984814

Browse files
committed
a few more tests
1 parent e229fc4 commit 7984814

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

tests/testthat/test-fit-laplace.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ fit_laplace <- testing_fit("logistic", method = "laplace", seed = 100)
55
PARAM_NAMES <- c("alpha", "beta[1]", "beta[2]", "beta[3]")
66

77

8-
test_that("summary() and print() methods works after vb", {
8+
test_that("summary() and print() methods works after laplace", {
99
x <- fit_laplace$summary()
1010
expect_s3_class(x, "draws_summary")
1111
expect_equal(x$variable, c("lp__", "lp_approx__", PARAM_NAMES))

tests/testthat/test-model-laplace.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ test_that("laplace() all valid 'mode' inputs give same results", {
7070
expect_is(fit1, "CmdStanLaplace")
7171
expect_is(fit2, "CmdStanLaplace")
7272
expect_is(fit3, "CmdStanLaplace")
73+
expect_is(fit1$mode(), "CmdStanMLE")
74+
expect_is(fit2$mode(), "CmdStanMLE")
75+
expect_is(fit3$mode(), "CmdStanMLE")
7376
expect_equal(fit1$mode()$mle(), fit2$mode()$mle())
7477
expect_equal(fit1$mode()$mle(), fit3$mode()$mle())
7578
expect_equal(fit1$lp(), fit2$lp())

0 commit comments

Comments
 (0)