Skip to content

Commit

Permalink
Update snapshots to align with dev rlang
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Jul 21, 2021
1 parent ac97b3e commit 42f03a4
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 24 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/as_tibble.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
Code
as_tibble(set_names(list(1:26), paste0("..", 1:26)))
Error <rlang_error>
`nm` must be `NULL` or a character vector the same length as `x`
The size of `nm` (26) must be compatible with the size of `x` (1).
Code
as_tibble(list(a = 1, a = 1))
Error <tibble_error_column_names_must_be_unique>
Expand Down Expand Up @@ -193,7 +193,7 @@
Code
as_tibble_row(set_names(list(1:26), paste0("..", 1:26)))
Error <rlang_error>
`nm` must be `NULL` or a character vector the same length as `x`
The size of `nm` (26) must be compatible with the size of `x` (1).
Code
as_tibble_row(list(a = 1, a = 1))
Error <tibble_error_column_names_must_be_unique>
Expand Down
36 changes: 18 additions & 18 deletions tests/testthat/_snaps/msg.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,54 +316,54 @@
Output
<error/tibble_error_incompatible_size>
Tibble columns must have compatible sizes.
* Size 10: Requested with `uvw` argument.
* Size 3: Column `c`.
* Size 4: Columns `a` and `b`.
Size 10: Requested with `uvw` argument.
Size 3: Column `c`.
Size 4: Columns `a` and `b`.
i Only values of size one are recycled.
Code
error_incompatible_size(10, letters[1:3], c(2, 2, 3),
"Requested with `xyz` argument")
Output
<error/tibble_error_incompatible_size>
Tibble columns must have compatible sizes.
* Size 10: Requested with `xyz` argument.
* Size 2: Columns `a` and `b`.
* Size 3: Column `c`.
Size 10: Requested with `xyz` argument.
Size 2: Columns `a` and `b`.
Size 3: Column `c`.
i Only values of size one are recycled.
Code
error_incompatible_size(NULL, letters[1:3], c(2, 2, 3),
"Requested with `xyz` argument")
Output
<error/tibble_error_incompatible_size>
Tibble columns must have compatible sizes.
* Size 2: Columns `a` and `b`.
* Size 3: Column `c`.
Size 2: Columns `a` and `b`.
Size 3: Column `c`.
i Only values of size one are recycled.
Code
error_incompatible_size(10, 1:3, c(4, 4, 3), "Requested with `uvw` argument")
Output
<error/tibble_error_incompatible_size>
Tibble columns must have compatible sizes.
* Size 10: Requested with `uvw` argument.
* Size 3: Column at position 3.
* Size 4: Columns at positions 1 and 2.
Size 10: Requested with `uvw` argument.
Size 3: Column at position 3.
Size 4: Columns at positions 1 and 2.
i Only values of size one are recycled.
Code
error_incompatible_size(10, 1:3, c(2, 2, 3), "Requested with `xyz` argument")
Output
<error/tibble_error_incompatible_size>
Tibble columns must have compatible sizes.
* Size 10: Requested with `xyz` argument.
* Size 2: Columns at positions 1 and 2.
* Size 3: Column at position 3.
Size 10: Requested with `xyz` argument.
Size 2: Columns at positions 1 and 2.
Size 3: Column at position 3.
i Only values of size one are recycled.
Code
error_incompatible_size(NULL, 1:3, c(2, 2, 3), "Requested with `xyz` argument")
Output
<error/tibble_error_incompatible_size>
Tibble columns must have compatible sizes.
* Size 2: Columns at positions 1 and 2.
* Size 3: Column at position 3.
Size 2: Columns at positions 1 and 2.
Size 3: Column at position 3.
i Only values of size one are recycled.
Code
# # tribble
Expand All @@ -388,8 +388,8 @@
Output
<error/tibble_error_tribble_non_rectangular>
Data must be rectangular.
* Found 5 columns.
* Found 17 cells.
Found 5 columns.
Found 17 cells.
i 17 is not an integer multiple of 5.
Code
error_frame_matrix_list(2:4)
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/tibble.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
tibble(a = 1, b = 2:3, c = 4:6, d = 7:10)
Error <tibble_error_incompatible_size>
Tibble columns must have compatible sizes.
* Size 2: Existing data.
* Size 3: Column `c`.
Size 2: Existing data.
Size 3: Column `c`.
i Only values of size one are recycled.

4 changes: 2 additions & 2 deletions tests/testthat/_snaps/tribble.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
tribble(~a, ~b, 1)
Error <tibble_error_tribble_non_rectangular>
Data must be rectangular.
* Found 2 columns.
* Found 1 cells.
Found 2 columns.
Found 1 cells.
i 1 is not an integer multiple of 2.
Code
tribble(a ~ b, 1)
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-as_tibble.R
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ test_that("converting from matrix uses implicit row names when `rownames =` is p
})

test_that("output test", {
skip_if_not_installed("rlang", "0.4.11.9001")
expect_snapshot_with_error({
as_tibble(list(1))
as_tibble(list(1, 2))
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-msg.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ test_that("aborting with class", {
})

test_that("output test", {
skip_if_not_installed("rlang", "0.4.11.9001")
expect_snapshot({
"# add"
error_add_rows_to_grouped_df()
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-tibble.R
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ test_that("is_tibble", {
})

test_that("output test", {
skip_if_not_installed("rlang", "0.4.11.9001")
expect_snapshot_with_error({
tibble(a = 1, a = 1)
tibble(a = new_environment())
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test-tribble.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ test_that("tribble and frame_matrix cannot have named arguments", {
})

test_that("output test", {
skip_if_not_installed("rlang", "0.4.11.9001")
expect_snapshot_with_error({
tribble(1)
tribble(~a, ~b, 1)
Expand Down

0 comments on commit 42f03a4

Please sign in to comment.