Skip to content

Commit

Permalink
tidy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Oct 9, 2024
1 parent 699ab23 commit 157c017
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
5 changes: 0 additions & 5 deletions tests/crs.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ suppressWarnings(
sf_project("+proj=longlat", "+proj=lcc +lat_1=30 +lat_2=60", cbind(c(0,0),c(-80,-90)), keep = TRUE)
)
st_transform(st_sfc(st_point(c(0,0)), st_point(c(1,1)), crs = 4326), 3857)
if (Sys.getenv("USER") %in% c("edzer", "travis")) { # causes memory leaks:
stopifnot(inherits(try(sf_project("+proj=longlat", "+proj=bar", matrix(1:4,2)), silent = TRUE), "try-error"))
stopifnot(inherits(try(sf_project("+proj=foo", "+proj=longlat", matrix(1:4,2)), silent = TRUE), "try-error"))
}

if (sf_extSoftVersion()["USE_PROJ_H"] == "true" || sf_proj_info("have_datum_files")) {
"datum files installed"
} else {
Expand Down
9 changes: 1 addition & 8 deletions tests/crs.Rout.save
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ Bounding box: xmin: 0 ymin: 0 xmax: 111319.5 ymax: 111325.1
Projected CRS: WGS 84 / Pseudo-Mercator
POINT (0 0)
POINT (111319.5 111325.1)
> if (Sys.getenv("USER") %in% c("edzer", "travis")) { # causes memory leaks:
+ stopifnot(inherits(try(sf_project("+proj=longlat", "+proj=bar", matrix(1:4,2)), silent = TRUE), "try-error"))
+ stopifnot(inherits(try(sf_project("+proj=foo", "+proj=longlat", matrix(1:4,2)), silent = TRUE), "try-error"))
+ }
proj_create: Error 1027 (Invalid value for an argument): Unknown projection
proj_create: Error 1027 (Invalid value for an argument): Unknown projection
>
> if (sf_extSoftVersion()["USE_PROJ_H"] == "true" || sf_proj_info("have_datum_files")) {
+ "datum files installed"
+ } else {
Expand All @@ -100,4 +93,4 @@ proj_create: Error 1027 (Invalid value for an argument): Unknown projection
>
> proc.time()
user system elapsed
0.626 1.357 0.510
0.750 1.093 0.700

0 comments on commit 157c017

Please sign in to comment.