Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-smart88 committed Aug 23, 2024
1 parent 7864f48 commit e5f4928
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/testthat/test-helpers.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
test_that("Check printVecAsis function works as expected", {
expect_equal(printVecAsis(1) , 1)
expect_equal(printVecAsis("a") , "'a'")
expect_equal(printVecAsis("a") , "\"a\"")
expect_equal(printVecAsis(c(1, 2, 3)) , "c(1, 2, 3)")
expect_equal(printVecAsis(c("a", "b", "c")) , "c('a', 'b', 'c')")
expect_equal(printVecAsis(c("a", "b", "c")) , "c(\"a\", \"b\", \"c\")")
})

test_that("Check wrap_terra function works as expected", {
Expand All @@ -14,7 +14,7 @@ test_that("Check wrap_terra function works as expected", {
single_ras <- terra::rast(aggdf$datapath)
expect_is(wrap_terra(single_ras), "PackedSpatRaster")

list_ras <- cov_upload(covdf, resp_shape(shpdf))
list_ras <- cov_upload(resp_shape(shpdf), covdf)
expect_is(wrap_terra(list_ras), "list")
expect_is(wrap_terra(list_ras)[[1]], "PackedSpatRaster")

Expand All @@ -29,7 +29,7 @@ test_that("Check unwrap_terra function works as expected", {
single_ras <- terra::wrap(terra::rast(aggdf$datapath))
expect_is(unwrap_terra(single_ras), "SpatRaster")

list_ras <- cov_upload(covdf, resp_shape(shpdf))
list_ras <- cov_upload(resp_shape(shpdf), covdf)
list_ras <- lapply(list_ras, terra::wrap)
expect_is(unwrap_terra(list_ras), "list")
expect_is(unwrap_terra(list_ras)[[1]], "SpatRaster")
Expand Down

0 comments on commit e5f4928

Please sign in to comment.