Skip to content

Commit

Permalink
test point
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Sep 17, 2023
1 parent c764cf8 commit b63cf40
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion r/geoarrow/R/handle.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

geoarrow_handle_wk <- function(x, handler, size = NA_integer_) {
geoarrow_handle <- function(x, handler, size = NA_integer_) {
stream <- as_geoarrow_array_stream(x)
handler <- wk::as_wk_handler(handler)

Expand Down
22 changes: 20 additions & 2 deletions r/geoarrow/tests/testthat/test-handle.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@

test_that("wk handler works", {
geoarrow_handle_wk(wk::xy(0, 1), wk::wk_debug_filter())
test_that("handler works on geoarrow.point", {
expect_identical(
geoarrow_handle(wk::xy(0:1999, 1:2000), wk::xy_writer()),
wk::xy(0:1999, 1:2000)
)

expect_identical(
geoarrow_handle(wk::xyz(0, 1, 2), wk::xy_writer()),
wk::xyz(0, 1, 2)
)

expect_identical(
geoarrow_handle(wk::xym(0, 1, 3), wk::xy_writer()),
wk::xym(0, 1, 3)
)

expect_identical(
geoarrow_handle(wk::xyzm(0, 1, 2, 3), wk::xy_writer()),
wk::xyzm(0, 1, 2, 3)
)
})

0 comments on commit b63cf40

Please sign in to comment.