Skip to content

Commit

Permalink
update snapshot tests for tile funs based on new changes to checking …
Browse files Browse the repository at this point in the history
…functions
  • Loading branch information
njtierney committed Jan 16, 2025
1 parent 53a2b4b commit bb1bbeb
Showing 1 changed file with 59 additions and 2 deletions.
61 changes: 59 additions & 2 deletions tests/testthat/_snaps/tile-funs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
tile_n(r, n = 3.14)
Condition
Error in `tile_n()`:
! 3.14 must be an integer.
We see that "n" is: 3.14
! `n` must be an integer.
We see that `n` is: 3.14

---

Expand All @@ -31,3 +31,60 @@
6.141667 6.533333 49.441667 49.816667

# tile_grid fails with non integer

Code
tile_grid(r, ncol = 1.5, nrow = 2.5)
Condition
Error in `tile_grid()`:
! `ncol` must be an integer.
We see that `ncol` is: 1.5

---

Code
tile_grid(r, ncol = 1, nrow = 2.5)
Condition
Error in `tile_grid()`:
! `nrow` must be an integer.
We see that `nrow` is: 2.5

---

Code
tile_grid(r, ncol = 1.5, nrow = 2)
Condition
Error in `tile_grid()`:
! `ncol` must be an integer.
We see that `ncol` is: 1.5

---

Code
tile_grid(r, ncol = 2, nrow = 3)
Output
[[1]]
xmin xmax ymin ymax
5.741667 6.141667 49.941667 50.191667
[[2]]
xmin xmax ymin ymax
6.141667 6.533333 49.941667 50.191667
[[3]]
xmin xmax ymin ymax
5.741667 6.141667 49.691667 49.941667
[[4]]
xmin xmax ymin ymax
6.141667 6.533333 49.691667 49.941667
[[5]]
xmin xmax ymin ymax
5.741667 6.141667 49.441667 49.691667
[[6]]
xmin xmax ymin ymax
6.141667 6.533333 49.441667 49.691667

0 comments on commit bb1bbeb

Please sign in to comment.