Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
r-a-dobson committed Jun 11, 2023
1 parent e6cddf3 commit 7bb430a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 8 additions & 0 deletions tests/testthat/test-dynamic_proj_covariates.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ test_that("Works if static rasters and buffering", {
})










test_that("Works if spatial.ext = polygon", {
dates <- c("2010-01-01")
polygon <- sf::st_polygon(list(cbind(c(20, 12, 36, 36,20), c(-35, -12, -35, -12,-35))))
Expand Down
10 changes: 0 additions & 10 deletions tests/testthat/test-extract_static_coords.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,3 @@ test_that("Works if static rastersx2 and buffering", {
})



test_that("Works if static rastersx2 and buffering", {
results<-extract_static_coords(occ.data = sample_explan_data,
varnames = c("random_cat_layer","random_cat_layer2"),
static.rasters = c(random_cat_layer,random_cat_layer),
moving.window.matrix = matrix(1,3,3),
GEE.math.fun = "sum")
expect_equal(ncol(results), ncol(sample_explan_data)+2)
})

0 comments on commit 7bb430a

Please sign in to comment.