Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 14beca6

Browse files
committed
add roundtrip testcase
1 parent 3eb7bbb commit 14beca6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

inst/tinytest/test_vect-geom.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
2-
f <- system.file("ex/lux.shp", package="terra")
1+
f <- system.file("ex/lux.shp", package = "terra")
32
lux <- vect(f)
43

54
listofraw <- geom(lux[1:2, ], wkb = TRUE)
65
wkb <- listofraw[[1]]
76
hex <- geom(lux[1, ], hex = TRUE)
87

8+
expect_equal(
9+
vect(listofraw, type = NULL, crs = crs(lux)),
10+
lux[1:2, character()]
11+
)
912

10-
expect_equal(typeof(listofraw), "list")
13+
expect_equal(typeof(listofraw), "list")
1114
expect_equal(typeof(wkb), "raw")
1215

1316
expect_equal(tolower(paste0(as.character(wkb), collapse = "")), tolower(hex))
14-

0 commit comments

Comments
 (0)