Skip to content

Commit 3f8ea3b

Browse files
committed
fix failing tests
1 parent 1835fbb commit 3f8ea3b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/testthat/test-mcmc-intervals.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ test_that("mcmc_intervals/areas with rhat", {
8686

8787
expect_gg(g <- mcmc_intervals(arr, rhat = r))
8888
rhat_map <- g$layers[[3]][["mapping"]]
89-
expect_identical(rhat_map$colour, as.name("rhat_rating"))
89+
expect_identical(as.character(rhat_map[["colour"]]), c("~", "rhat_rating"))
9090

9191
# areas with rhat.
9292

@@ -95,18 +95,18 @@ test_that("mcmc_intervals/areas with rhat", {
9595
# layer 2 is inner interval.
9696
expect_gg(g2 <- mcmc_areas(arr, rhat = r))
9797
rhat_map2 <- g2$layers[[2]][["mapping"]]
98-
expect_identical(rhat_map2$fill, as.name("rhat_rating"))
99-
expect_identical(rhat_map2$colour, as.name("rhat_rating"))
98+
expect_identical(as.character(rhat_map2$fill), c("~", "rhat_rating"))
99+
expect_identical(as.character(rhat_map2$colour), c("~", "rhat_rating"))
100100

101101
# layer 3 is point estimate. manually colored. [skip]
102102

103103
# layer 4 is outer interval.
104104
rhat_map4 <- g2$layers[[4]][["mapping"]]
105-
expect_identical(rhat_map4$colour, as.name("rhat_rating"))
105+
expect_identical(as.character(rhat_map4$colour), c("~", "rhat_rating"))
106106

107107
# layer 5 is bottom line.
108108
rhat_map5 <- g2$layers[[5]][["mapping"]]
109-
expect_identical(rhat_map5$colour, as.name("rhat_rating"))
109+
expect_identical(as.character(rhat_map5$colour), c("~", "rhat_rating"))
110110
})
111111

112112
test_that("mcmc_areas_data computes density", {

tests/testthat/test-ppc-distributions.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test_that("ppc_dens,pp_hist,ppc_freqpoly,ppc_boxplot return ggplot objects", {
3030

3131
expect_gg(p <- ppc_hist(y, yrep[1:8, ], binwidth = 3))
3232
facet_var <- "rep_label"
33-
expect_equal(as.character(p$facet$params$facets[1]), facet_var)
33+
expect_equal(as.character(p$facet$params$facets[[1]])[2], facet_var)
3434
})
3535

3636
test_that("ppc_freqpoly_grouped returns a ggplot object", {

0 commit comments

Comments
 (0)