Skip to content

Commit

Permalink
[tests] fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Apr 20, 2024
1 parent b05fc92 commit 6bb7978
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions R/wb_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ dims_to_dataframe <- function(dims, fill = FALSE) {
#' dataframe_to_dims(df)
#' @keywords internal
#' @export
dataframe_to_dims <- function(df, dim_break = TRUE) {
dataframe_to_dims <- function(df, dim_break = FALSE) {

if (dim_break) {

Expand Down Expand Up @@ -102,7 +102,7 @@ dataframe_to_dims <- function(df, dim_break = TRUE) {
tmp <- paste0(
cols[[1]][[1]], rows[[1]][[1]],
":",
rev(cols)[[1]][[1]], rev(rows)[[1]][[1]]
rev(cols)[[1]][[1]], rev(rows)[[1]][[1]]
)

return(tmp)
Expand Down
2 changes: 1 addition & 1 deletion man/dataframe_to_dims.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/dims_helper.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-wb_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ test_that("dataframe_to_dims", {

# dims_to_dataframe will always create a square
df <- dims_to_dataframe("A1:D5;F1:F6;D8", fill = TRUE)
dims <- dataframe_to_dims(df)
dims <- dataframe_to_dims(df, dim_break = TRUE)
df2 <- dims_to_dataframe(dims, fill = TRUE)
expect_equal(df, df2)

Expand Down

0 comments on commit 6bb7978

Please sign in to comment.