Skip to content

Commit

Permalink
Use {testthat} edition 3 (#490)
Browse files Browse the repository at this point in the history
* Update tests to be testthat ed 3

* Update snaps
  • Loading branch information
schloerke committed Feb 12, 2024
1 parent b062ddf commit a635e2d
Show file tree
Hide file tree
Showing 73 changed files with 64,232 additions and 64,244 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ Language: en-US
RdMacros: lifecycle
Remotes:
tidyverse/ggplot2@rc/3.5.0
Config/testthat/edition: 3
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ S3method("+",gg)
S3method("[",ggmatrix)
S3method("[",glyphplot)
S3method("[<-",ggmatrix)
S3method(as.character,ggmatrix_fn_with_params)
S3method(as.character,ggmatrix_plot_obj)
S3method(grid.draw,ggmatrix)
S3method(print,ggmatrix)
S3method(print,glyphplot)
Expand Down
2 changes: 2 additions & 0 deletions R/ggpairs_internal_plots.R
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ wrap <- function(funcVal, ..., funcArgName = deparse(substitute(funcVal))) {
wrap_fn_with_params <- wrap


#' @export
as.character.ggmatrix_fn_with_params <- function(x, ...) {
params <- attr(x, "params")
fnName <- attr(x, "name")
Expand Down Expand Up @@ -220,6 +221,7 @@ mapping_as_string <- function(mapping) {
str_c("c(", str_c(names(mapping), as.character(mapping), sep = " = ", collapse = ", "), ")")
}

#' @export
as.character.ggmatrix_plot_obj <- function(x, ...) {
hasGg <- (!is.null(x$gg))
mappingTxt <- mapping_as_string(x$mapping)
Expand Down
20 changes: 10 additions & 10 deletions tests/testthat/_snaps/gglegend/custom.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions tests/testthat/_snaps/gglegend/internal-legend.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions tests/testthat/_snaps/gglegend/points.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 16 additions & 16 deletions tests/testthat/_snaps/gglegend/pos-left.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 16 additions & 16 deletions tests/testthat/_snaps/gglegend/pos-right.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a635e2d

Please sign in to comment.