Skip to content

Commit

Permalink
test some parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed May 27, 2024
1 parent 5dd7b83 commit e55a5d6
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/testthat/test-type.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,35 @@ test_that("vctr type constructors create the correct types", {
)
})

test_that("vctr type constructors pass parameters through", {
expect_identical(
geoarrow_schema_parse(geoarrow_wkb(crs = "OGC:CRS84", edges = "SPHERICAL")),
geoarrow_schema_parse(
na_extension_wkb(crs = "OGC:CRS84", edges = "SPHERICAL")
)
)

expect_identical(
geoarrow_schema_parse(
geoarrow_point(
dimensions = "XYZ",
coord_type = "INTERLEAVED",
crs = "OGC:CRS84",
edges = "SPHERICAL"
)
),
geoarrow_schema_parse(
na_extension_geoarrow(
"POINT",
dimensions = "XYZ",
coord_type = "INTERLEAVED",
crs = "OGC:CRS84",
edges = "SPHERICAL"
)
)
)
})

test_that("geoarrow_schema_parse() can parse a schema", {
parsed <- geoarrow_schema_parse(na_extension_geoarrow("POINT"))
expect_identical(parsed$id, 1L)
Expand Down

0 comments on commit e55a5d6

Please sign in to comment.