Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# bayesplot (development version)

* Added test verifying `legend_move("none")` behaves equivalently to `legend_none()`.
* Added singleton-dimension edge-case tests for exported `_data()` functions.
* Validate empty list and zero-row matrix inputs in `nuts_params.list()`.
* Validate user-provided `pit` values in `ppc_loo_pit_data()` and `ppc_loo_pit_qq()`, rejecting non-numeric inputs, missing values, and values outside `[0, 1]`.
Expand Down
9 changes: 7 additions & 2 deletions tests/testthat/test-convenience-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ test_that("legend_text returns correct theme object", {
theme(legend.text = element_text(color = "purple", size = 16))
)
})
test_that("legend_move('none') behaves like legend_none", {
expect_equal(
legend_move("none")$legend.position,
legend_none()$legend.position,
ignore_attr = TRUE
)
})

# axis and facet text --------------------------------------------------
test_that("xaxis_text returns correct theme object", {
Expand Down Expand Up @@ -186,8 +193,6 @@ test_that("overlay_function returns the correct object", {
a$constructor <- b$constructor <- NULL
expect_equal(a, b, ignore_function_env = TRUE)
})


# tagged functions -------------------------------------------------------

test_that("as_tagged_function handles bare function (symbol)", {
Expand Down
Loading