Skip to content

Commit

Permalink
test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
mjskay committed Feb 24, 2024
1 parent 1aa4e1b commit ef4e199
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 29 deletions.
8 changes: 4 additions & 4 deletions R/geom_slabinterval.R
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ switch_fill_type = function(fill_type, segments, gradient, call = caller_env())
gradient = {
tryCatch({
check_device("gradients", maybe = TRUE, call = call)
}, warning = function(e) {
}, warning = function(e) { # nocov start
cli_warn(
c(
'{.code fill_type = "gradient"} does not appear to be supported by the
Expand All @@ -1154,14 +1154,14 @@ switch_fill_type = function(fill_type, segments, gradient, call = caller_env())
class = "ggdist_gradients_not_supported",
parent = e
)
})
}) # nocov end
gradient
},
auto = {
tryCatch({
check_device("gradients", maybe = FALSE, call = call)
gradient
}, warning = function(e) {
}, warning = function(e) { # nocov start
cli_warn(
c(
'{.code fill_type = "gradient"} is not supported by the current graphics device.',
Expand All @@ -1182,7 +1182,7 @@ switch_fill_type = function(fill_type, segments, gradient, call = caller_env())
parent = e
)
segments
})
}) # nocov end
},
cli_abort(c(
'Unknown {.arg fill_type}: {.code {deparse0(fill_type)}}',
Expand Down

0 comments on commit ef4e199

Please sign in to comment.