From e5f4928ea9c5df79b1f94dc49e8a392e42f4654b Mon Sep 17 00:00:00 2001 From: simon-smart88 Date: Fri, 23 Aug 2024 15:53:48 +0100 Subject: [PATCH] fix tests --- tests/testthat/test-helpers.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/testthat/test-helpers.R b/tests/testthat/test-helpers.R index 3b94f9a..56c0376 100644 --- a/tests/testthat/test-helpers.R +++ b/tests/testthat/test-helpers.R @@ -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", { @@ -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") @@ -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")