Skip to content

Commit

Permalink
fix tests for #218
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed May 27, 2020
1 parent cdd8977 commit aacf702
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/testthat/test-sf-construction.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,16 @@ make_sfc <- function (x, type) {
attr(x, "precision") <- 0.0
class(x) <- c(paste0("sfc_", class(x[[1L]])[2L]), "sfc")
attr(x, "bbox") <- bb
NA_crs_ <- structure(list(epsg = NA_integer_,
proj4string = NA_character_), class = "crs")

if (packageVersion ("sf") < 0.9)
NA_crs_ <- structure(list(epsg = NA_integer_,
proj4string = NA_character_), class = "crs")
else
NA_crs_ <- structure (list (input = NA_character_,
wkt = NA_character_), class = "crs")
attr(x, "crs") <- NA_crs_
x

return (x)
}


Expand Down

0 comments on commit aacf702

Please sign in to comment.